Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Re: 502 Bad Gateway Error with ModPerl scripts

by thunders (Priest)
on Sep 29, 2003 at 15:34 UTC ( #294995=note: print w/ replies, xml ) Need Help??

in reply to Re: 502 Bad Gateway Error with ModPerl scripts
in thread 502 Bad Gateway Error with ModPerl scripts

That's my plan for external requests, but then it wouldn't work right for internal stuff. I'm not sure if I can tell apache to use a different rule for requests coming from 192.168.0.* I'm sure there's a way.

Comment on Re: Re: 502 Bad Gateway Error with ModPerl scripts
Replies are listed 'Best First'.
Re: Re: Re: 502 Bad Gateway Error with ModPerl scripts
by sgifford (Prior) on Sep 29, 2003 at 16:27 UTC

    If you're proxying requests, your Web server will be making the connection, so the hostname needs to be something your Web server can connect to. It could be as simple as hardcoding in

    My suspicion is that when you're browsing internally, you're doing something like, so when Apache rewrites the address to proxy, it connects to When you're coming from the outside, you're visiting Apache rewrites the address, tries to connect to, gets the IP address of the public side of the NAT, and can't connect to it. If that's the case, another solution is split horizon DNS, so that inside your network resolves to, while outside it resolves to your external NAT address.

      Thanks for the tip. Changing the %{HTTP_HOST} part to the loopback address, seems to do the right thing in both cases.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://294995]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2015-11-28 05:50 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (738 votes), past polls