Apache Reverse Proxy to a Wordpress site passes subpath when it shouldn't -


i've been trying set reverse proxy on main website blog site of url format

example.com/blog -> blog.example.com

example.com/blog on apache instance , in httpd.conf have added following.

sslproxyengine on  proxypreservehost off proxyrequests off  proxypassmatch /blog https://blog.example.com proxypassreverse /blog https://blog.example.com 

this works keeps 404ing. news is reverse proxying correctly because grabs 404 page of blog.

after looking @ apache access logs found passing subpath whatever reason /blog blog.example.com fetching blog.example.com/blog. when users navigate /blog, 404 naturally. however, understanding when setting proxypassreverse make request @ specified in above case should requesting blog.example.com , not passing /blog @ end.

here snippet documentation confirms above in how should work:

for example, suppose local server has address http://example.com/; then

proxypass /mirror/foo/ http://backend.example.com/ proxypassreverse /mirror/foo/ http://backend.example.com/ proxypassreversecookiedomain backend.example.com public.example.com proxypassreversecookiepath / /mirror/foo/ 

will not cause local request http://example.com/mirror/foo/bar internally converted proxy request http://backend.example.com/bar (the functionality proxypass provides here).

any ideas why might be? worst case might try add redirect or rewrite /blog goes homepage have permalinks set in such way /blog in slug of articles.

fyi using apache 2.2.

i'm idiot. using proxypassmatch instead of proxypass. ugh.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -