Re: Filter on top of a CGI script
[prev]
[thread]
[next]
[Date index for 2005/03/22]
Hi Scott,
As far as I understand, your handler Apache::SiteMoved does all the
dirty work for you on Apache-1, replacing the hostname. Additionally,
you want your CGI script to remain as a CGI for some reason. In this
case you can happily live with no Filter chain. Just take the input of
your handler through the pipe.
Hope this helps,
Slava
http://www.lastmileisp.com/
On Tue, 2005-03-22 at 14:12, Scott Gifford wrote:
> Hello,
>
> I've got a filter which replaces references to a particular hostname
> with another name, to allow testing of a new server. The filter is
> very simple, and works great for static files (thanks in part to some
> earlier help from this list!)
>
> But, I can't get it to work for CGI scripts. If I put:
>
> ScriptAlias /cgi-bin /home/flinthomes/cgi-perl
> <Location /cgi-bin>
> AllowOverride None
>
> SetHandler perl-script
> PerlSetVar Filter On
> PerlHandler Apache::RegistryFilter Apache::SiteMoved
> PerlSendHeader On
>
> Options +ExecCGI
> allow from all
> </Location>
>
> it displays the text of the Perl script.
>
> I don't want the script to run under mod_perl since I'm still
> debugging it on the new host; I want Apache to run it as usual, then
> filter its output through the Apache::SiteMoved handler.
>
> Is there a way to tell Apache and mod_perl to do that?
>
> Thanks!
>
> ----ScottG.
 |
 |
Re: Filter on top of a CGI script
Slava Bizyayev 22:10 on 22 Mar 2005
|