Re: Apache 2 + mod_perl + virtual host problems
[prev]
[thread]
[next]
[Date index for 2005/02/21]
humm,
i need virtual host to have unique @INC on per virtual host basis:
http://perl.apache.org/docs/2.0/user/config/config.html#Modifying_C__INC__on_a_Per_VirtualHost
because i need each developper to use their own librairies version in
devel stage...
its hard to me to have a cgi-bin to run these scripts, the website
under developpement is structured as follow :
/login.pl
/images/*.jpg *.gif ........
/application1/main.pl
/application1/*.pl
/application1/images/*.jpg *.gif ........
.......
/application2/*.pl
.......
i dont want to have a /cgi-bin path for the website....
i just want all the .pl to be treated as perl-run cgi scripts
is it possible? maybe is it a debian bug or perl + mod_perl + apache
version combination that makes me trouble?
thx
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
>
>
> Bruno Lavoie wrote:
> Hello, my problem is very confusing! and i absolutely need it working! at
> work i need to configure multiples developement zone under apache 2 and
> mod_perl 2, and this as virtual host for each programmer. I need to run
> environement in ModPerl::PerlRun because we have dirty scripts that doesnt
> work under ModPerl::Registry i'm running on a debian box with :
> Apache/2.0.52 (Debian GNU/Linux) PHP/4.3.10-2 mod_perl/1.999.20 Perl/v5.8.4
> and here is my virtual host settings : <VirtualHost *> ServerName
> developername.domain.com ServerAdmin my@xxxx.xxxxxx ServerSignature On
> LogLevel warn ErrorLog /fsg/intranet-fsgbla/logs/apache-error.log CustomLog
> /fsg/intranet-fsgbla/logs/apache-common.log common DocumentRoot
> /fsg/intranet-fsgbla/htdocs/ PerlModule Apache2 PerlModule ModPerl::PerlRun
> PerlOptions +Parent PerlSwitches -Mlib=/fsg/intranet-fsgbla/htdocs <Files ~
> ".pl$"> SetHandler perl-script PerlResponseHandler ModPerl::PerlRun
> PerlOptions +ParseHeaders Options +ExecCGI </Files> <Location /perl-status>
> SetHandler perl-script PerlHandler Apache::Status </Location> </VirtualHost>
> the weirdest thing is the PerlResponseHandler ModPerl::PerlRun in the <Files
> ~ ...> directives scope dont call scripts, my error log show me when i call
> a .pl file : Code: [Thu Feb 17 10:02:55 2005] [error]
> /fsg/intranet-fsgbla/htdocs/test.pl not found or unable to stat when i
> change the ModPerl::PerlRun to ModPerl::Registry, IT WORKS? no errors in
> error log file! WHY? i tried a lot of thing and i'm very out of ideas?
> someone knows it? thanks a lot Bruno
>
 |
(message missing)
|