Apache2, mod_proxy installed, using reverse proxy for more than a dozen sites, works flawlessly for those. Added one more directive but going to that URL results in a 404 error.
For the purpose of this question the apache server is designated as web1
.
<Ifmodule proxy_module>
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
The directive below is an example of what works for all (but one) existing cases. It's noteworthy that all existing cases pass the request from /somedirectory
(on web1
) to http://somewebserver/somedirectory
.
ProxyPass /sample1 http://web2/sample1
ProxyPassReverse /sample1 http://web2/sample1
The directive below results in a 404:
ProxyPass /sample3 http://web3
ProxyPassReverse /sample3 http://web3
The difference is that for /sample3
the directive points to the root of web3
rather than a directory on web3
.
There's also the question whether the 404 is actually being generated by Apache on web1
or not. When setting LogLevel debug
on web1
the error_log
does not contain any errors about the ProxyPass
ProxyPassReverse
directives. Likewise the access_log
on web1
does not contain any trace of the request to /sample3
.
This is what the 404 looks like in Firefox/Chrome:
The goal is to have content located on in the root of web3
show up as web1/sample3
. Due to a number of reasons relocating the content from the root of web3
to web3/sample3
is not an option at this time.
Is there a glaring error in my implementation? If not, what steps can I take to continue troubleshooting this? Thanks in advance!