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 <[EMAIL PROTECTED]> 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