lighttpd PHP 错误:403 - 禁止
我一直在尝试在Windows 上使用lighttpd 配置Web 服务器。安装 PHP 后,每次尝试从目录“htdocs”访问 PHP 文件时,都会收到错误:“403 - 禁止”。我已按照本教程设置lighttpd:http://joshdick.net/writing/lighttpd。我搜索过谷歌,但没有找到关于这个问题的任何好的文档。仅供参考:我对此很陌生。我的“lighttpd-inc.conf”文件的内容位于此处。
任何帮助将不胜感激。谢谢!
I have been trying to configure a web server using lighttpd on Windows. After installing PHP, everytime I try to access a PHP file from the directory 'htdocs,' I get the error: '403 - Forbidden.' I have followed this tutorial to setup lighttpd: http://joshdick.net/writing/lighttpd. I have searched Google, but haven't found any good documentation on this problem. FYI: I'm pretty new to this. I have the content of my 'lighttpd-inc.conf' file here.
Any help would be greatly appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这可能有很多事情。例如,如果您在 Windows 上使用 FastCGI,则可能会出现问题(它们运行不佳)。它可能很简单,因为您的文件夹权限(在 Windows 中)不允许访问此文件夹。然而,在尝试查看您的 .conf 文件(缺少换行符使其难以阅读)之后,我有一个您可以开始查找的地方。
看来您错误地引用了 htdocs 的路径。例如,这里的这一行:
我认为该路径无法正常工作。通常你必须有一个“/HTDOCS/”样式的路径。您的文件中有很多这样的行。以下是一些相关文档的链接:
http://redmine.lighttpd.net /wiki/1/server.document-rootdetails
There are a lot of things this could be. For instance, if you are using FastCGI on Windows there may be an issue (they don't play nice). It could be as simple as your folder permissions (in Windows) don't allow access to this folder. However, after trying to look over your .conf file (the lack of line breaks makes it a bear to read), I have a place you could start looking.
It looks like you are referring to the path to htdocs improperly. For example, this line here:
I don't think that path will work properly. Usually you have to have a "/HTDOCS/" style path. There are a number of lines like this throughout your file. Here is a link to some documentation on this:
http://redmine.lighttpd.net/wiki/1/server.document-rootdetails
你的 php 的 cgi/fcgi 配置不正确。 CGI 或 FCGI 是将 PHP 和 lighttpd 粘合在一起的粘合剂。
检查你的lighttpd error.log
它会声明类似:
我使用:
确保在modules.conf中启用fastcgi
Your cgi/fcgi to your php is not configured correctly. CGI or FCGI is the glue that binds PHP and lighttpd together.
check your lighttpd error.log
it will state something like:
i use:
make sure that fastcgi is enabled in modules.conf
看来您必须启用 fastcgi 模块和 php 配置。要执行此操作,请运行以下命令:
It looks like you have to enable the fastcgi module and the php configuration. To perform that run the following commands: