你有一个单独的Location
或Directory
每个脚本,还是他们都住在同一个地方?如果是前者,我会使用PerlSetEnv
Alias /apps/thisone/ /srv/http/site/apps/thisone/
<Location /apps/thisone/>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
PerlSetEnv MYLIB /srv/http/site/apps/thisone/lib
Options +ExecCGI
Order allow,deny
Allow from all
</Location>
如果是后者:
Alias /apps/ /srv/http/site/apps/
<Location /apps/thisone/>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
PerlSetEnv THISONE_LIB /srv/http/site/apps/thisone/lib
PerlSetEnv THATONE_LIB /srv/http/site/apps/thisone/lib
Options +ExecCGI
Order allow,deny
Allow from all
</Location>