You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Chad Arimura <ne...@alldorm.com> on 2004/05/21 00:47:38 UTC

Turning off modperl in specific directories

 

I setup our server to handle requests through mod_perl with the following
directive:

 

<Directory "/var/www/main">

Options FollowSymLinks ExecCGI

Order allow,deny

Allow from all

 

<FilesMatch "\.(cgi|pl)$">

SetHandler perl-script

PerlHandler Apache::Registry

</FilesMatch>       

</Directory>

 

There is a subdirectory underneath there that I do NOT want mod_perl to
handle. specifically:

 

<Directory "/var/www/main/sub">

            Turn off here.

</Directory>

 

Is there something that I can use in there to handle the scripts through
reg. CGI?

 

Our setup is as follows:  SERVER_SOFTWARE   Apache/1.3.27 (Unix)
(Red-Hat/Linux) mod_python/2.7.8 Python/1.5.2 mod_ssl/2.8.12 OpenSSL/0.9.6b
DAV/1.0.3 mod_perl/1.26 mod_throttle/3.1.2

 

 

Thanks, 

Chad Arimura

AllDorm Inc.


Re: Turning off modperl in specific directories

Posted by Stas Bekman <st...@stason.org>.
Chad Arimura wrote:
> Thanks Stas.  That makes sense, but when I set the handler to
> default-handler, running the cgi in a browser just displays the code of the
> script on the screen...  do you know what I'm missing?

http://perl.apache.org/docs/1.0/guide/config.html#Alias_Configurations

> chad
> 
> 
> -----Original Message-----
> From: Stas Bekman [mailto:stas@stason.org] 
> Sent: Thursday, May 20, 2004 3:57 PM
> To: Chad Arimura
> Cc: modperl@perl.apache.org
> Subject: Re: Turning off modperl in specific directories
> 
> Chad Arimura wrote:
> 
>> 
>>
>>I setup our server to handle requests through mod_perl with the following
>>directive:
>>
>> 
>>
>><Directory "/var/www/main">
>>
>>Options FollowSymLinks ExecCGI
>>
>>Order allow,deny
>>
>>Allow from all
>>
>> 
>>
>><FilesMatch "\.(cgi|pl)$">
>>
>>SetHandler perl-script
>>
>>PerlHandler Apache::Registry
>>
>></FilesMatch>       
>>
>></Directory>
>>
>> 
>>
>>There is a subdirectory underneath there that I do NOT want mod_perl to
>>handle. specifically:
>>
>> 
>>
>><Directory "/var/www/main/sub">
>>
>>            Turn off here.
>>
>></Directory>
>>
>> 
>>
>>Is there something that I can use in there to handle the scripts through
>>reg. CGI?
> 
> 
> Let the guide be with you:
> http://perl.apache.org/docs/1.0/guide/config.html#Overriding_E_lt_LocationE_
> gt__Setting_in__Sub_Location_
> 


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Turning off modperl in specific directories

Posted by Tom Schindl <to...@gmx.at>.
Hi,

have either set a ScriptAlias like

-------------------8<-------------------
ScriptAlias /cgi-bin/ "/var/www/main/sub/cgi-bin/"
-------------------8<-------------------

or an AddHandler

-------------------8<-------------------
AddHandler cgi-script .cgi
-------------------8<-------------------

set?

Where from should apache know what do with the file? The default handler
simply delivers every file.

Tom

Chad Arimura wrote:
> Thanks Stas.  That makes sense, but when I set the handler to
> default-handler, running the cgi in a browser just displays the code of the
> script on the screen...  do you know what I'm missing?
> 
> chad
> 
> 
> -----Original Message-----
> From: Stas Bekman [mailto:stas@stason.org] 
> Sent: Thursday, May 20, 2004 3:57 PM
> To: Chad Arimura
> Cc: modperl@perl.apache.org
> Subject: Re: Turning off modperl in specific directories
> 
> Chad Arimura wrote:
> 
>> 
>>
>>I setup our server to handle requests through mod_perl with the following
>>directive:
>>
>> 
>>
>><Directory "/var/www/main">
>>
>>Options FollowSymLinks ExecCGI
>>
>>Order allow,deny
>>
>>Allow from all
>>
>> 
>>
>><FilesMatch "\.(cgi|pl)$">
>>
>>SetHandler perl-script
>>
>>PerlHandler Apache::Registry
>>
>></FilesMatch>       
>>
>></Directory>
>>
>> 
>>
>>There is a subdirectory underneath there that I do NOT want mod_perl to
>>handle. specifically:
>>
>> 
>>
>><Directory "/var/www/main/sub">
>>
>>            Turn off here.
>>
>></Directory>
>>
>> 
>>
>>Is there something that I can use in there to handle the scripts through
>>reg. CGI?
> 
> 
> Let the guide be with you:
> http://perl.apache.org/docs/1.0/guide/config.html#Overriding_E_lt_LocationE_
> gt__Setting_in__Sub_Location_
> 


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Turning off modperl in specific directories

Posted by Tom Schindl <to...@bestsolution.at>.
Hi,

have either set a ScriptAlias like

-------------------8<-------------------
ScriptAlias /cgi-bin/ "/var/www/main/sub/cgi-bin/"
-------------------8<-------------------

or an AddHandler

-------------------8<-------------------
AddHandler cgi-script .cgi
-------------------8<-------------------

set?

Where from should apache know what do with the file? The default handler 
simply delivers every file.

Tom

Chad Arimura wrote:
> Thanks Stas.  That makes sense, but when I set the handler to
> default-handler, running the cgi in a browser just displays the code of the
> script on the screen...  do you know what I'm missing?
> 
> chad
> 
> 
> -----Original Message-----
> From: Stas Bekman [mailto:stas@stason.org] 
> Sent: Thursday, May 20, 2004 3:57 PM
> To: Chad Arimura
> Cc: modperl@perl.apache.org
> Subject: Re: Turning off modperl in specific directories
> 
> Chad Arimura wrote:
> 
>> 
>>
>>I setup our server to handle requests through mod_perl with the following
>>directive:
>>
>> 
>>
>><Directory "/var/www/main">
>>
>>Options FollowSymLinks ExecCGI
>>
>>Order allow,deny
>>
>>Allow from all
>>
>> 
>>
>><FilesMatch "\.(cgi|pl)$">
>>
>>SetHandler perl-script
>>
>>PerlHandler Apache::Registry
>>
>></FilesMatch>       
>>
>></Directory>
>>
>> 
>>
>>There is a subdirectory underneath there that I do NOT want mod_perl to
>>handle. specifically:
>>
>> 
>>
>><Directory "/var/www/main/sub">
>>
>>            Turn off here.
>>
>></Directory>
>>
>> 
>>
>>Is there something that I can use in there to handle the scripts through
>>reg. CGI?
> 
> 
> Let the guide be with you:
> http://perl.apache.org/docs/1.0/guide/config.html#Overriding_E_lt_LocationE_
> gt__Setting_in__Sub_Location_
> 


-- 
b e s t s o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl        leiter softwareentwicklung   mobile  ++43 664 3145958
------------------------------------------------------------------------
eduard-bodem-gasse 8/3    A-6020 innsbruck      fax      ++43 512 935833
http://www.bestsolution.at                      phone    ++43 512 935834

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Turning off modperl in specific directories

Posted by Drew Taylor <dr...@drewtaylor.com>.
I believe you want "cgi-script" instead of "default-handler".

Drew

Chad Arimura wrote:

> Thanks Stas.  That makes sense, but when I set the handler to
> default-handler, running the cgi in a browser just displays the code of the
> script on the screen...  do you know what I'm missing?
> 
> chad
> 
> 
> -----Original Message-----
> From: Stas Bekman [mailto:stas@stason.org] 
> Sent: Thursday, May 20, 2004 3:57 PM
> To: Chad Arimura
> Cc: modperl@perl.apache.org
> Subject: Re: Turning off modperl in specific directories
> 
> Chad Arimura wrote:
> 
>> 
>>
>>I setup our server to handle requests through mod_perl with the following
>>directive:
>>
>> 
>>
>><Directory "/var/www/main">
>>
>>Options FollowSymLinks ExecCGI
>>
>>Order allow,deny
>>
>>Allow from all
>>
>> 
>>
>><FilesMatch "\.(cgi|pl)$">
>>
>>SetHandler perl-script
>>
>>PerlHandler Apache::Registry
>>
>></FilesMatch>       
>>
>></Directory>
>>
>> 
>>
>>There is a subdirectory underneath there that I do NOT want mod_perl to
>>handle. specifically:
>>
>> 
>>
>><Directory "/var/www/main/sub">
>>
>>            Turn off here.
>>
>></Directory>
>>
>> 
>>
>>Is there something that I can use in there to handle the scripts through
>>reg. CGI?
> 
> 
> Let the guide be with you:
> http://perl.apache.org/docs/1.0/guide/config.html#Overriding_E_lt_LocationE_
> gt__Setting_in__Sub_Location_
> 


-- 
----------------------------------------------------------------
Drew Taylor                 *  Web development & consulting
Email: drew@drewtaylor.com  *  Site implementation & hosting
Web  : www.drewtaylor.com   *  perl/mod_perl/DBI/mysql/postgres
----------------------------------------------------------------


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


RE: Turning off modperl in specific directories

Posted by Chad Arimura <ne...@alldorm.com>.
Thanks Stas.  That makes sense, but when I set the handler to
default-handler, running the cgi in a browser just displays the code of the
script on the screen...  do you know what I'm missing?

chad


-----Original Message-----
From: Stas Bekman [mailto:stas@stason.org] 
Sent: Thursday, May 20, 2004 3:57 PM
To: Chad Arimura
Cc: modperl@perl.apache.org
Subject: Re: Turning off modperl in specific directories

Chad Arimura wrote:
>  
> 
> I setup our server to handle requests through mod_perl with the following
> directive:
> 
>  
> 
> <Directory "/var/www/main">
> 
> Options FollowSymLinks ExecCGI
> 
> Order allow,deny
> 
> Allow from all
> 
>  
> 
> <FilesMatch "\.(cgi|pl)$">
> 
> SetHandler perl-script
> 
> PerlHandler Apache::Registry
> 
> </FilesMatch>       
> 
> </Directory>
> 
>  
> 
> There is a subdirectory underneath there that I do NOT want mod_perl to
> handle. specifically:
> 
>  
> 
> <Directory "/var/www/main/sub">
> 
>             Turn off here.
> 
> </Directory>
> 
>  
> 
> Is there something that I can use in there to handle the scripts through
> reg. CGI?

Let the guide be with you:
http://perl.apache.org/docs/1.0/guide/config.html#Overriding_E_lt_LocationE_
gt__Setting_in__Sub_Location_

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Turning off modperl in specific directories

Posted by Stas Bekman <st...@stason.org>.
Chad Arimura wrote:
>  
> 
> I setup our server to handle requests through mod_perl with the following
> directive:
> 
>  
> 
> <Directory "/var/www/main">
> 
> Options FollowSymLinks ExecCGI
> 
> Order allow,deny
> 
> Allow from all
> 
>  
> 
> <FilesMatch "\.(cgi|pl)$">
> 
> SetHandler perl-script
> 
> PerlHandler Apache::Registry
> 
> </FilesMatch>       
> 
> </Directory>
> 
>  
> 
> There is a subdirectory underneath there that I do NOT want mod_perl to
> handle. specifically:
> 
>  
> 
> <Directory "/var/www/main/sub">
> 
>             Turn off here.
> 
> </Directory>
> 
>  
> 
> Is there something that I can use in there to handle the scripts through
> reg. CGI?

Let the guide be with you:
http://perl.apache.org/docs/1.0/guide/config.html#Overriding_E_lt_LocationE_gt__Setting_in__Sub_Location_

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Turning off modperl in specific directories

Posted by Jozef Kosoru <zy...@uid0.sk>.
Hi,

On Thu, May 20, 2004 at 16:02:43 -0700, Stas Bekman wrote:
> >Sorry.. 2 hours of messing around, I decide to email the list, and 3
> >minutes later I figure out the problem.
> >
> >PerlHandler Apache::PerlRun
> 
> The answer is wrong. It still runs under mod_perl, but in
> "mod_cgi"-like mode, not "mod_cgi". See my other reply.

<Directory|Location ...>
	SetHandler none
</Directory|Location>

Regards,
	Jozef

--
jozef kosoru
http://www.uid0.sk/zyzstar

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Turning off modperl in specific directories

Posted by Stas Bekman <st...@stason.org>.
Chad Arimura wrote:
>  
> 
> Sorry.. 2 hours of messing around, I decide to email the list, and 3 minutes
> later I figure out the problem.
> 
>  
> 
> PerlHandler Apache::PerlRun

The answer is wrong. It still runs under mod_perl, but in "mod_cgi"-like mode, 
not "mod_cgi". See my other reply.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


RE: Turning off modperl in specific directories

Posted by Chad Arimura <ne...@alldorm.com>.
 

Sorry.. 2 hours of messing around, I decide to email the list, and 3 minutes
later I figure out the problem.

 

PerlHandler Apache::PerlRun

 

If anybody has anything to add, please do.  But it works now.

 

 

Cheers,

Chad

 

  _____  

From: Chad Arimura [mailto:newsgroups@alldorm.com] 
Sent: Thursday, May 20, 2004 3:48 PM
To: modperl@perl.apache.org
Subject: Turning off modperl in specific directories

 

 

I setup our server to handle requests through mod_perl with the following
directive:

 

<Directory "/var/www/main">

Options FollowSymLinks ExecCGI

Order allow,deny

Allow from all

 

<FilesMatch "\.(cgi|pl)$">

SetHandler perl-script

PerlHandler Apache::Registry

</FilesMatch>       

</Directory>

 

There is a subdirectory underneath there that I do NOT want mod_perl to
handle. specifically:

 

<Directory "/var/www/main/sub">

            Turn off here.

</Directory>

 

Is there something that I can use in there to handle the scripts through
reg. CGI?

 

Our setup is as follows:  SERVER_SOFTWARE   Apache/1.3.27 (Unix)
(Red-Hat/Linux) mod_python/2.7.8 Python/1.5.2 mod_ssl/2.8.12 OpenSSL/0.9.6b
DAV/1.0.3 mod_perl/1.26 mod_throttle/3.1.2

 

 

Thanks, 

Chad Arimura

AllDorm Inc.