Trying a Reverse Proxy Setup for WordPress

The goal is to server wordpress from https://www.example.com/blog/ without running wordpress from the www.example.com server. The only way I know to do this is to reverse proxy from the www.example.com server. In this case, a request to https://www.example.com/blog/some-path will be accepted by the www.example.com server, sent to https://blog.example.com/ transparently in the background, and the response forwarded on to the client as a response to its original request.

Useful Resources

Running a Reverse Proxy with Apache:

And old guide, but it goes over the underlying principals rather well.


Setting up WordPress behind a reverse proxy – Tanya Nam

apache 2.2 - Wordpress behind reverse proxy - Server Fault


WordPress › Support » WordPress behind a reverse proxy/ssl endpoint, slightly borked

See this one for notes on using wp-cli for search and replace.


Hosted WordPress on a Subdirectory Using Reverse Proxy

For the plugin-approach to making sure all the wordpress links and references use the reverse-proxied url.


WordPress behind a reverse proxy.

Another plugin, but much simpler than the previously mentioned plugin. Not sure if we’ll need either of the plugins for our scenario. This gist also reminds us to update the .htaccess RewriteBase and RewriteRule lines. Although I presently expect these lines to be updated when we change the wordpress settings to refer to the new root url.