Lỗi là:apache suexec "lệnh không docroot"
command not in docroot (/home/site1/cgi-bin/test.pl).
Here Tôi thấy điều này:
suexec đòi hỏi kịch bản CGI được dưới DocumentRoot của máy chủ (không phải là VirtualHost DocumentRoot) . Nó được cho phép, tuy nhiên, cho VirtualHost DocumentRoot là một liên kết tượng trưng đến một thư mục xuất hiện bên dưới DocumentRoot thực.
một phần của cấu hình máy chủ ảo là:
[...]
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>
[...]
Vì vậy, tôi thích có Perl script bên trong cgi-bin, nhưng nếu tôi không thể giải quyết vấn đề này tôi có thể di chuyển tất cả các kịch bản để htdocs.
Gói 'apache2-suexec-custom' cho phép linh hoạt hơn. –
Excelent. Chính xác những gì tôi đang tìm kiếm. –
Lệnh có nhiều khả năng là 'suexec -V', hãy chú ý đến mũ. – insaner