linux – apache suexec“命令不在docroot中”
错误信息是:
command not in docroot (/home/site1/cgi-bin/test.pl). Here我发现了这个:
虚拟主机配置的一部分是: [...] 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. 解决方法
suEXEC有自己的docroot,它完全独立于你在Apache配置中配置的内容.您可以通过调用来查看suEXEC的docroot是什么:
suexec -V 你可能需要成为root用户.在我的情况下,docroot是/ var / www.你必须把你的脚本放在那里.没有办法改变这个保存重新编译suEXEC.不要尝试使用符号链接将脚本保留在/ var / www之外(或者配置suEXEC的任何内容). 编辑:正如@insaner在评论中提到的那样,命令可能是suexec,或者我在至少一个服务器suexec2上看到过. suEXEC就是Apache文档所称的模块/功能. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |