Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Bug with mod_perl and proxy due to $SCRIPT_URL ??

Quote Reply
Bug with mod_perl and proxy due to $SCRIPT_URL ??
Alex,

In the admin, you assign:

$SCRIPT_URL = $ENV{'SCRIPT_NAME'};

Then, you create the left hand menu from that.

When the mod_perl proxy engine runs, though, _it_ runs the script as "cgi-bin" since that is the path name.

Is this something done for security?

If the mod_perl server is running, it makes sense to use for the admin features too, but this seems to bypass it.

------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/








Quote Reply
Re: Bug with mod_perl and proxy due to $SCRIPT_URL ?? In reply to
Ok, if we add that module, are there other changes to be made to the Apache config? Or are the IP's now passed off automatically?

I'll try modifying the apache this weekend, and then update the installation instructions <G>


------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/








Quote Reply
Re: Bug with mod_perl and proxy due to $SCRIPT_URL ?? In reply to
This is for convienance. You might want to just add:

Alias /perl/ /cgi-bin/

in your perl httpd.conf, then you can call everything with both URL's. Other then that, you'd could replace $ENV{SCRIPT_NAME} with just the script name, admin.cgi.

One other gotcha you'll come across and I should have warned you about: you don't have access to client hostnames/ip's. Because the request is proxied, you have the proxy's ip/hostname (which is usually localhost/127.0.0.1).

To get around this, you want to add the really tiny module to the light end server:

http://perl.apache.org/...od_proxy_add_forward

This will make the IP available in the environment variables $ENV{'X-Forwarded-For'}.

Cheers,

Alex