Forum Moderators: phranque

Message Too Old, No Replies

Problems with ProxyPass/Reverse - Please HELP

         

wazh

6:33 am on Feb 17, 2007 (gmt 0)

10+ Year Member



Hi,

I am very new to Linux so please excuse my noobness about some of the concepts.

I have a main webserver and decided that I would really like to get at another internal website that I was running.

ProxyPass/Reverse seemed to be the way to go. So I added the following statements to httpd.conf.

ProxyPass /app/ [172.16.2.4...]
ProxyPassReverse /app/ [172.16.2.4...]

This appeared to work as I saw the first page of the website. However once there the website throws a pop-up to auth to the site before entering. This fails as I notice that /app/ is not appended to the webserver name. Thus

[webserver...] fails.

I did a bit of reading about the net but it appears there maybe solutions with rewrite etc but then its getting a little to complex for me to understand syntax etc.

Can anyone please help me. I would really love to be able to utilize this functionality.

Many Many Thanks
Warren

This is the error I am seeing in the error_log

[Sat Feb 17 17:21:59 2007] [error] [client IP] File does not exist: /var/www/html/image, referer: [webserver...]
[Sat Feb 17 17:22:10 2007] [error] [client IP] script not found or unable to stat: /var/www/cgi-bin/prevLogin.cgi, referer: [webserver...]

jdMorgan

3:34 pm on Feb 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Two things come to mind.

First, and probably having nothing to do with your problem, it's unlikely that you need the Forward proxy function, and I'd advise you to disable it, leaving only the Reverse proxy enabled. Having the forward proxy enabled is a security problem, and your server may join the many others that are used as proxies to commit mayhem on the 'net... See the mod_proxy documentation.

The second point is that mod_auth may be configured to execute before mod_proxy on your server, and this means that requests won't be passed to the back-end until mod_auth executes, giving the symptoms you describe.

On Apache 1.x, you may be able to re-arrange the LoadModule list to address this problem; Modules execute in the reverse order that they are loaded on Apache 1.x.

Apache 2.x uses an internal priority scheme to determine load order, and I'm not sure how (or if) you can change the execution order, short of re-compiling Apache after adjusting the logic used for that scheme.

You might also consider moving the authorization to the front-end server to avoid all this.

The above is based on reading the book; I have no experience with this problem, but maybe this will help get you going.

Jim