homepage Welcome to WebmasterWorld Guest from 54.163.89.8
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Apache proxy config help please.
mod_proxy config
cdouser

5+ Year Member



 
Msg#: 3606099 posted 5:42 am on Mar 20, 2008 (gmt 0)

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

10+ Year Member



 
Msg#: 3606099 posted 7:51 pm on Mar 23, 2008 (gmt 0)

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?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved