Skip to content

Instantly share code, notes, and snippets.

@JamesPaden
Created September 3, 2015 11:53
Show Gist options
  • Save JamesPaden/7a020357e533f4ab31cd to your computer and use it in GitHub Desktop.
Save JamesPaden/7a020357e533f4ab31cd to your computer and use it in GitHub Desktop.
Apache Config for Wordpress Reverse Proxy
# Put this inside the <VirtualHost> directive
<Location /blog>
RequestHeader set X-Is-Reverse=Proxy true
RequestHeader set X-Original-Host yourwebsite.com
ProxyPass http://yourpressableblog.com
ProxyPassReverse http://yourpressableblog.com
</Location>
@sidneydemoraes
Copy link

Hi James. I noticed your gist is 3 years old. Does this setup apply to a specific Apache version? I'm giving it a try but my static files keep pointing to localhost instead of my domain. It's worth saying that my Wordpress instance is inside a docker container and I'm trying to proxy pass to localhost:8010.

@Antoinebr
Copy link

@sidneydemoraes

I have the same issue, did you find a fix ?

@tomaszwostal
Copy link

@Antoinebr
Add ProxyPreserveHost On to config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment