linux–apache suexec“命令不在docroot中”

linux–apache suexec“命令不在docroot中”,第1张

概述错误信息是:command not in docroot (/home/site1/cgi-bin/test.pl). Here我发现了这个: suexec requires the CGI script to be under the server's DocumentRoot (not the VirtualHost DocumentRoot). I

错误信息是:

command not in docroot (/home/site1/cgi-bin/test.pl).

Here我发现了这个:

suexec requires the CGI script to be under the server’s documentRoot (not the VirtualHost documentRoot). It is permitted,however,for the VirtualHost documentRoot to be a symlink to a directory that appears under the real documentRoot.

虚拟主机配置的一部分是:

[...]DirectoryIndex index.HTML index.HTML index.PHPdocumentRoot /home/site1/htdocsSuexecUserGroup site1 site1ScriptAlias /cgi-bin/ /home/site1/cgi-bin/

所以,我更喜欢在cgi-bin中使用Perl脚本,但是如果我无法解决这个问题,我可以将所有脚本移动到htdocs.最佳答案suEXEC有自己的docroot,它完全独立于你在Apache配置中配置的内容.您可以通过调用来查看suEXEC的docroot是什么:

suexec -V

你可能需要成为root用户.在我的情况下,docroot是/ var / www.你必须把你的脚本放在那里.没有办法改变这个保存重新编译suEXEC.不要尝试使用符号链接将脚本保留在/ var / www之外(或者配置suEXEC的任何内容).

编辑:正如@insaner在评论中提到的那样,命令可能是suexec,或者我在至少一个服务器suexec2上看到过. suEXEC就是Apache文档所称的模块/功能.

总结

以上是内存溢出为你收集整理的linux – apache suexec“命令不在docroot中”全部内容,希望文章能够帮你解决linux – apache suexec“命令不在docroot中”所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/yw/1046971.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)