lighttpd PHP错误:403-禁止 [英] lighttpd PHP Error: 403 - Forbidden

查看:97
本文介绍了lighttpd PHP错误:403-禁止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在Windows上使用lighttpd配置Web服务器.安装PHP后,每次尝试从目录"htdocs"访问PHP文件时,都会收到错误消息:"403-Forbidden".我已经按照本教程设置了lighttpd: http://joshdick.net/writing/lighttpd .我已经搜索过Google,但是没有找到关于此问题的任何好的文档.仅供参考:我对此很陌生.我有我的"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!

推荐答案

这可能有很多事情.例如,如果您在Windows上使用FastCGI,可能会出现问题(它们的播放效果不佳).就像您的文件夹权限(在Windows中)不允许访问此文件夹一样简单.但是,在尝试查看您的.conf文件(缺少换行符使它难以阅读)之后,我有了一个可以开始查找的地方.

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.

似乎您在错误地指向htdocs的路径.例如,此行:

It looks like you are referring to the path to htdocs improperly. For example, this line here:

server.document-root = "HTDOCS/"

我认为该路径无法正常工作.通常,您必须具有"/HTDOCS/"样式路径.整个文件中都有许多这样的行.这是一些文档的链接:

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.文档根目录详细信息

这篇关于lighttpd PHP错误:403-禁止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆