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?