Forum Moderators: phranque

Message Too Old, No Replies

Error 403 after ProxyPass

redirection via proxypass causes 403 forbidden error

         

ptbuddha

7:12 am on Jul 1, 2004 (gmt 0)

10+ Year Member



I have Apache running a PC connected to the internet called mail.domain.com.
I have Apache running on another machine called web.domain.com. This PC has an internal IP address that is not addressable from the internet.

In order to serve up this web site, I have added the following commands to httpd.conf of mail.domain.com.

ProxyRequests Off
ProxyPass /test [web.domain.com...]
ProxyPassReverse /test [web.domain.com...]

When I enter [mail.domain.com...] I get the correct web site, so Apache is working properly.

When I enter [web.domain.com...] on the intranet, I get the web page I expected.

When I enter [mail.domain.com...] from the internet, I get an 'Error 403 - Forbidden. You are not authorized to view this page'. I should get the same content as [web.domain.com....]

Can anybody explain what could be wrong?

lurch

3:10 am on Jul 6, 2004 (gmt 0)

10+ Year Member



I just had to register here to respond to you. I had this same problem all day (driving me NUTS). Turns out my problem was that in the httpd.conf file I had uncommented the line that says something like "LoadModule proxy" but I did NOT comment out the other two LoadModule lines that loaded the http proxy and the ftp proxy. :) So if you uncomment those (like I did) it should work! The way I found it out -- I set up a custom error log for my virtual host and it said that the protocol proxy wasn't loaded.

Hope that helps!

lurch

3:11 am on Jul 6, 2004 (gmt 0)

10+ Year Member



Oops, I mis-worded that. Here's the lines I'm talking about from my httpd.conf (note that they must NOT be commented out for this to work):

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so

Specifically, I did not uncomment the last two (which was my problem). :)

ptbuddha

7:36 am on Jul 9, 2004 (gmt 0)

10+ Year Member



Thanks for the help.

The extra lines weren't even there to uncomment, so I added to them and now it appears to work as expected.