エラーメッセージは次のとおりです。apacheのsuexecの "ドキュメントルート内のコマンドではない"
command not in docroot (/home/site1/cgi-bin/test.pl).
Here私はこれを見つけた:
suexecのは、サーバのDocumentRootの(ないのVirtualHostのDocumentRoot)下にCGIスクリプトが必要です。ただし、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'はより柔軟に対応します。 –
Excelent。まさに私が探していたもの。 –
コマンドは 'suexec -V'である可能性が高く、大文字に注意してください。 – insaner