command not in docroot (/home/site1/cgi-bin/test.pl).
Here我发现这一点:
suexec的需要CGI脚本是在服务器的DocumentRoot(而不是虚拟主机的DocumentRoot) 。但是,允许VirtualHost DocumentRoot成为出现在真实DocumentRoot下的目录的符号链接。
虚拟主机配置的一部分:
[...]
DirectoryIndex index.html index.html index.php
DocumentRoot /home/site1/htdocs
SuexecUserGroup site1 site1
ScriptAlias /cgi-bin/ /home/site1/cgi-bin/
<Location /home/site1/cgi-bin>
Options +ExecCGI
</Location>
<Directory /home/site1/>
Options -Includes -Indexes -FollowSymLinks +ExecCGI MultiViews
AddHandler cgi-script .cgi .pl
AllowOverride none
Order allow,deny
Allow from all
</Directory>
[...]
所以,我更喜欢有cgi-bin目录中的Perl脚本,但如果我解决不了这个问题,我可以将所有脚本htdocs目录。
软件包'apache2-suexec-custom'允许更多的灵活性。 –
优秀。正是我在找什么。 –
该命令更可能是'suexec -V',请注意上限。 – insaner