thunders has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to get a mod_perl enabled server running from my home PC. The way it's set up currently I have a server on port 80 for static requests, and another on port 8200 for mod_perl.
I have apache set up to send requests to the http://myhost/perl/ subdirectory to my mod_perl server, with this rewrite rule:
<IfDefine PERLPROXIED> <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^proxy:.* - [F] RewriteRule ^(.*\/perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P] RewriteRule ^(.*\/cgi-perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P] </IfModule> </IfDefine>
This works when I connect from a computer on my home network, but If I try to call the scripts from the internet. I get a "502 Bad Gateway" Error. I assume it is because the %{HTTP_HOST} variable is filled in with a router assigned internal IP.
I think I need to set up a different rewrite rule for external requests. Does anyone know how to do that?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 502 Bad Gateway Error with ModPerl scripts
by zby (Vicar) on Sep 29, 2003 at 15:10 UTC | |
by thunders (Priest) on Sep 29, 2003 at 15:34 UTC | |
by sgifford (Prior) on Sep 29, 2003 at 16:27 UTC | |
by thunders (Priest) on Sep 29, 2003 at 17:17 UTC |