Welcome to WebmasterWorld Guest from 54.144.126.195

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Apache proxy config help please.

mod_proxy config

     

cdouser

5:42 am on Mar 20, 2008 (gmt 0)

5+ Year Member



Hi,

I am looking to deploy Apache 2.2 on a Windows box as a reverse-proxy to two servers. The following is what I have in httpd.conf on the reverse-proxy.

<VirtualHost *:*>
ProxyPreserveHost On
ProxyHTMLLogVerbose On
ProxyPass /app [XX.XX.XX.XX...]
ProxyPassReverse /app [XX.XX.XX.XX...]
ProxyHTMLURLMap [192.168.122.184...] /app
</VirtualHost>

<VirtualHost *:*>
ProxyPreserveHost On
ProxyHTMLLogVerbose On
ProxyPass /backup/app [YY.YY.YY.YY...]
ProxyPassReverse /backup/app [YY.YY.YY.YY...]
ProxyHTMLURLMap [YY.YY.YY.YY...] /backup/app
</VirtualHost>

The first server XX.XX.XX.XX is the main application and the proxy is able to redirect browser requests without any problems. However, the second server is not reachable through the proxy.

I turned on LogLevel Debug and the proxy's error.log has the following.

[Wed Mar 19 22:08:20 2008] [error] [client XX.XX.ZZ.ZZ] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/backup

Also, the direct access to second server, bypassing the proxy, using [YY.YY.YY.YY...] works fine, both from the browser client as well as from the proxy.

Is there anything I am missing?

Thanks.

wkitty42

7:51 pm on Mar 23, 2008 (gmt 0)

10+ Year Member



1. do you really need to be passing the original Host: line from the incoming request on to the backside server(s)?

2. what is the ProxyHTMLLogVerbose directive for? i don't find it in the v2.0 or v2.2 documentation on the apache site...

3. what is the ProxyHTMLURLMap directive for? i don't find it in the v2.0 or v2.2 documentation on the apache site...

FWIW: i pass a virtual site to a backside server AND i also pass a subdirectory of another virtual site to a backside server... currently, the same backside server but each destination is a virtual site on the backside server... as such, i use only three mod_proxy lines on the frontside server...

ProxyRequests Off
ProxyPass /directory/ [back.side.server...]
ProxyPassReverse /directory/ [back.side.server...]

and nothing else except for a minor mod_rewrite to ensure that there's a trailing slash on the REQUEST_URI /directory/ entry so that it can be seen properly by the mod_proxy code... i'm not sure what those other items are that you are using, why you possibly need them, or why things aren't working for you... are you trying to do some sort of load balancing?

 

Featured Threads

Hot Threads This Week

Hot Threads This Month