shyam
07-22-2005, 10:15 AM
Hi,
l have apache2 and mod_perl2 configured like this
apache2
|
+-htdocs
|
+-perl_scripts
| |
| +-MyProj
|
+-MyProj
|
+-perl_scripts
my httpd.conf looks like this
LoadModule perl_module modules/mod_perl.so
Alias /perl/ /online/apache2/htdocs/perl_scripts/
PerlModule ModPerl::Registry
<Location /perl/>
SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI
PerlSendHeader On
allow from all
</Location>
My question is while I can run my perl scripts by using the following url
http://localhost/perl/test.pl
&
http://localhost/perl/MyProj/test.pl (in which case my perl files have to be in the htdocs/perl_scripts/MyProj directory)
Instead I want to have my perl files in htdocs/MyProj/perl_scripts and access them like
http://localhost/MyProj/perl/test.pl
so that I can write new applications and deploy them by simply copying them to the htdocs folder instead copying the perl scripts to the perl_scripts dir.
That is when I use the /perl modifier anywere apache must execute the perl files from the current document root.
I'm new to perl/cgi and apache for the web...
thanks
shyam
l have apache2 and mod_perl2 configured like this
apache2
|
+-htdocs
|
+-perl_scripts
| |
| +-MyProj
|
+-MyProj
|
+-perl_scripts
my httpd.conf looks like this
LoadModule perl_module modules/mod_perl.so
Alias /perl/ /online/apache2/htdocs/perl_scripts/
PerlModule ModPerl::Registry
<Location /perl/>
SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI
PerlSendHeader On
allow from all
</Location>
My question is while I can run my perl scripts by using the following url
http://localhost/perl/test.pl
&
http://localhost/perl/MyProj/test.pl (in which case my perl files have to be in the htdocs/perl_scripts/MyProj directory)
Instead I want to have my perl files in htdocs/MyProj/perl_scripts and access them like
http://localhost/MyProj/perl/test.pl
so that I can write new applications and deploy them by simply copying them to the htdocs folder instead copying the perl scripts to the perl_scripts dir.
That is when I use the /perl modifier anywere apache must execute the perl files from the current document root.
I'm new to perl/cgi and apache for the web...
thanks
shyam