Re: Apache 2 + mod_perl + virtual host problems

[prev] [thread] [next] [Date index for 2005/02/21]

From: Leo
Subject: Re: Apache 2 + mod_perl + virtual host problems
Date: 16:01 on 21 Feb 2005
Your .pl file is not being executed.

It must be in the cgi-bin directory for ModPerl::PerlRun to do anything.

I tested your <Files ~ ".pl$"> apache config and it functioned for my 
test.pl even outside the cgi-bin directory.

You mentioned in a previous post your reasons for using vhosts...  I am 
not familiar enough with ModPerl::PerlRun or ModPerl::Registry to be 
able to provide reasons for the error in the original post.

It's better if someone more knowledgeable about these issues provide you 
more clarification. 

Bruno Lavoie wrote:

>i tried the user_dir public_html config
>
>this is :
>
>
><IfModule mod_userdir.c>
>        UserDir public_html
>        UserDir disabled root
>
>        <Directory /home/*/public_html>
>                AllowOverride FileInfo AuthConfig Limit
>                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
>        </Directory>
>
>        PerlModule ModPerl::PerlRun
>        <Directory /home/*/public_html/cgi-bin>            
>                SetHandler perl-script
>                PerlResponseHandler ModPerl::PerlRun
>                Options +ExecCGI
>                PerlOptions +ParseHeaders        
>        </Directory> 
></IfModule>
>
>and my .pl file is not executed..... the browser return me the .pl
>file for download and i can see the script source....
>
>and the file is chmod a+x
>
>:( 
>
>
>
>
>On Mon, 21 Feb 2005 11:49:40 -0300, Leo <leo-mod-perl@xxxxxxx.xxx.xx> wrote:
>  
>
>> Bruno:
>> 
>> If you use public_html for each user, you might be able to configure a
>>cgi-bin directory therein for testing such "dirty scripts" .
>> 
>> This is a modification of the default configuration of Apache2 on Gentoo...
>> 
>> <IfModule mod_perl.c>
>>     <Directory /home/*/public_html/cgi-bin>
>>         SetHandler perl-script
>>         PerlResponseHandler ModPerl::PerlRun
>>         Options +ExecCGI
>>         <IfDefine MODPERL2>
>>           PerlOptions +ParseHeaders
>>         </IfDefine>
>>         <IfDefine !MODPERL2>
>>           PerlSendHeader On
>>         </IfDefine>
>>     </Directory> 
>> </IfModule>
>> 
>> If you really need virtual hosts and have mod_vhosts_alias try this config
>>modified from gentoo virtual_homepages.conf
>> It assumes your virtual hosts are at /www/hosts
>> 
>> See the documentation for mod_vhost_alias for details.
>> 
>> #A virtually hosted homepages system
>> #
>> #   This is an adjustment of the above system tailored for an ISP's
>> #   homepages server. Using a slightly more complicated configuration we
>>can
>> #   select substrings of the server name to use in the filename so that
>>e.g.
>> #   the documents for www.user.isp.com are found in /home/user/. It uses a
>> #   single cgi-bin directory instead of one per virtual host.
>> 
>> # get the server name from the Host: header
>> #UseCanonicalName Off
>> 
>> # include part of the server name in the filenames
>> VirtualDocumentRoot /www/hosts/%2/docs
>> 
>> # single cgi-bin directory
>> ScriptAlias  /cgi-bin/  /www/std-cgi/
>> 
>> # if you are happy not using modperl for cgi scripts
>> # VirtualScriptAlias /cgi-bin/ /www/hosts/%2/cgi-bin/
>>   
>> # if you need modperl for cgi scripts                                   
>> <IfModule mod_perl.c>
>>     # foreach virtual host repeat the following
>>     <Directory /www/hosts/userfred.mydomain.com/cgi-bin>
>>         SetHandler perl-script
>>         PerlResponseHandler ModPerl::PerlRun
>>         Options +ExecCGI
>>         <IfDefine MODPERL2>
>>           PerlOptions +ParseHeaders
>>         </IfDefine>
>>         <IfDefine !MODPERL2>
>>           PerlSendHeader On
>>         </IfDefine>
>>     </Directory> 
>>     ...
>> </IfModule>
>> 
>> Also you may have to modify your VirtualDocumentRoot and VirtualScriptAlias
>>or the PerlRun Directory configs to reflect the real location of your
>>virtual domains.
>> 
>> Be sure your DNS is configured with all the virtual hosts you need.
>> 
>> Also note that I haven't tested any of these configs with debian Apache2.
>>But maybe it will give you a starting point.
>> 
>> please correct me where I may have made errors.
>> 
>> Leo
>>    
>>
>  
>

(message missing)

Apache 2 + mod_perl + virtual host problems
Bruno Lavoie 13:40 on 21 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Bruno Lavoie 14:58 on 21 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Perrin Harkins 18:13 on 21 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Bruno Lavoie 18:31 on 21 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Perrin Harkins 18:38 on 21 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Stas Bekman 01:39 on 22 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Bruno Lavoie 15:11 on 21 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Leo 16:01 on 21 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Perrin Harkins 18:09 on 21 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Bruno Lavoie 18:54 on 21 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Perrin Harkins 19:42 on 21 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Stas Bekman 01:49 on 22 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Bruno Lavoie 02:28 on 22 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Stas Bekman 02:40 on 22 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Bruno Lavoie 02:53 on 22 Feb 2005

Re: Apache 2 + mod_perl + virtual host problems
Bruno Lavoie 04:41 on 22 Feb 2005

Generated at 12:48 on 22 Feb 2005 by mariachi v0.52