[PerlChina] 通过cgi.pm上传文件

fayland fayland at gmail.com
Sun Jan 15 20:26:40 PST 2006


<LocationMatch "/perl/(static|favicon.ico)">
SetHandler default-handler
</LocationMatch>

比如你的图片放在 perl/img 下就可以这么写
<LocationMatch "/perl/img/">
或许你可以试试全路径 /home/ghw/myperl/webproject/img/

+ExecCGI 的意思是让这个文件夹可以运行 .cgi 这种文件。按道理讲是正确的,
Apache 的默认设置为
<Location /perl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
PerlOptions +SetupEnv
</Location>
我挺正常的。

黄叶 wrote:
> 如果我使用Directory指令进行配置的话,例如这样:
> Alias /perl/ /home/ghw/myperl/webproject/
> PerlSwitches -T
> <Directory /perl>
> AddHandler perl-script .pl
> SetHandler perl-script
> PerlResponseHandler ModPerl::Registry
> PerlOptions +ParseHeaders
> Options +ExecCGI
> Order allow,deny
> Allow from all
> </Directory>
>
>
> 运行的时候就会提示:
>
> [Mon Jan 16 09:59:14 2006] [error] [client 127.0.0.1
> <http://127.0.0.1>] Options ExecCGI is off in this directory:
> /home/ghw/myperl/webproject/li1.pl, referer: http://127.0.0.1/perl/
>
> 有点摸不着首尾了。
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> China-pm mailing list
> China-pm at pm.org
> http://mail.pm.org/mailman/listinfo/china-pm

-- 
Fayland Lam // http://www.fayland.org/ 




More information about the China-pm mailing list