[CODEX UPDATE NEEDED][SOLVED] Running WordPress behind reverse proxy
-
In case someone else runs into problems with nginx reverse proxy relocating / changing the public URL for a proxied WordPress install, especially if it involves a path change to a subdirectory…
I was having strange problems where the blog and some of the admin screens were picking up https://www.example.com/wpt/ and other admin links were appearing at / redirecting to https://www.example.com/
My setup involves two nginx instances “ahead” of the WordPress nginx instance, the second of which remaps https://www.example.com/wpt/ to https://wordpress.example.com/ (where the WordPress executes)
I had already tried the hard-coded approach for changing WP_SITEURL and WP_HOME and the RELOCATE approach described at https://codex.www.ads-software.com/Changing_The_Site_URL without success.
The resolution was to change the header that was being used to set HTTP_HOST as described at https://codex.www.ads-software.com/FAQ_Installation#How_can_I_get_WordPress_working_when_I.27m_behind_a_reverse_proxy.3F
CODEX UPDATE NEEDED:
I tried to access the referenced email thread there to better understand the “magic” involved, but the link does not return content. https://old.nabble.com/When-HTTP_HOST-does-not-point-to-the-blog-td18097138.html
That 2008 post appears to have been archived at https://web.archive.org/web/20100911103834/old.nabble.com/When-HTTP_HOST-does-not-point-to-the-blog-td18097138.html as one possible source.
My apologies if this is not the proper place to request Codex updates.
- The topic ‘[CODEX UPDATE NEEDED][SOLVED] Running WordPress behind reverse proxy’ is closed to new replies.