Score:0

reverse proxy between apache

vn flag

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.

ezra-s avatar
ru flag
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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.