cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Only able to access Wordpress blog via proxy

I am new to wordpress and trying to launch a blog website, which is mapped to a subdomain http://blog.xyz.com/blogs.
I want to proxy to this from my main domain https://xyz.com/blogs via apache

I have configured apache Proxypass as required.

I cannot understand the required settings to be made at wordpress end. I feel different kind of solutions have been provided by few. None worked for me yet. So I am not sure what steps should be adopted.

Kindly help me.

My steps followed- 

1. Configure apache-

<Location /blogs>
RequestHeader set X-Forwarded-Proto "https"
ProxyPass http://blog.xyz.com/blogs
ProxyPassReverse http://blog.xyz.com/blogs
Order allow,deny
Allow from all
</Location>

 

2. Add lines to wp-config.php

# ProxyPass Settings

define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';

 

Kindly help, if it is correct or any other configuration required.

3 REPLIES 3
Highlighted
Community Manager
Community Manager

Re: Only able to access Wordpress blog via proxy

Hi @Debasish2018. Thanks for being part of GoDaddy Community! I think the first thing to consider would be what kind of hosting plan you have. If you're on a GoDaddy shared hosting plan, then you wouldn't be able to do this. In looking into this, I found you need to have mod_proxy available on the server in order for it to work. That wouldn't be available on our shared plans. However, if you have a VPS or Dedicated Server, then you would be able to use mod_proxy. Hope that helps. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.
Highlighted

Re: Only able to access Wordpress blog via proxy

Hi @JesseW, thank you for responding and explaining it. But I am little confused. If I opt for VPS, where do I need to have mod_proxy? My main domain has a apache proxy server which is already serving my other applications. So, all I have to do is purchase VPS plan, host the website as usual and just write the proxy rule at the server end? Or do you mean, I will require to install mod_proxy at VPS after deploying the website?

My blog should have been "unable to access wordpress site from external proxy server".

Highlighted
Community Manager
Community Manager

Re: Only able to access Wordpress blog via proxy

@Debasish2018. Perhaps I don't fully understand your situation. I'm definitely not a developer or server admin. However, from what I read online, in order to use proxypass as you have it in your script, the server the script is running on needs to have mod_proxy, which is another Apache module. That isn't available on our shared hosting servers. You'd be able to use that module on a VPS, but I wouldn't be able to explain the process, unfortunately. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.