0

I need to set up a reverse proxy between two Apaches. My setup looks like the following, but it's not working.

<Location "/example/">
ProxyPass http://example.com/
ProxyPassReverse http://example.com/
</Location>

On the domain.com side, I have an apache in front that makes a proxy pass through ajp to the internal ip 10.1.0.17 and the configuration looks as shown below.

ProxyPass /example/ ajp://10.1.0.17:8009/example/
ProxyPassReverse /example/ ajp://10.1.0.17:8009/example/

When I navigate in a browser I get a status code 404 and looking at the apache log I see the following:

X.X.X.X - - [04/Apr/2023:18:22:23 -0400] "GET /proxy:ajp://10.1.0.17/example/ HTTP/1.1" 404 196

Anyone who has experience in this, if you can guide me I would greatly appreciate it.

Félix
  • 1
  • First, I would never recommend placing proxypass directives in Location, it just leads to confusion, just use `ProxyPass /example/ http://example.com/` and make sure you load mod_proxy and mod_proxy_http modules in that order. For the second case which proxypass directives are defined correctly just make sure you have mod_proxy and then mod_proxy_ajp loaded in that order. Other things like redirects and rewrites you may have copy pasted from somewhere can get in the way. If the problem persists, make sure you show more of the configuration you have. – Daniel Ferradal Apr 20 '23 at 19:44

0 Answers0