Apache reverse proxy to serve local folder
am 05.07.2007 08:22:57 von MrHydeHi,
I'm not sure whether this is possible or not. I've looked around, but
have not found anything so far. I've got an apache server installed
that currently runs purely as a reverse proxy. It has a number of
virtual hosts defined that proxy the requests to a number of backend
systems. A default has also been set up to proxy requests to another
server.
A sample of how the server is setup is as follows
http://www.xyz.com ---- > http://realwebserver.xyz.com/rootfolder
http://mail.xyz.com ----> http://realmailserver.xyz.com/mail
http://random.xyz.com ----> http://realwebserver.xyz.com/rootfolder
Now a requirement has come up for this particular apache server to
also serve content. I have not been able to get this to work. I
can't setup a new virtual host to go back to itself as that would put
it in a loop. I can't go directly to the proxy as the default
settings would forward the request to the other server.
If I try to go to http://proxy.xyz.com/test the request is forwarded
to http://realwebserver.xyz.com and comes back with a 404 error.
There must be a way to somehow say, forward everything except requests
for proxy.xyz.com/test which will be served locally.
Any help?
Regards
Vivek