apache XAMPP 的问题,禁止访问...正在寻找 d:\xampp 而不是 c:\xampp
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2497059/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
problem with XAMPP, access forbidden... looking for d:\xampp not c:\xampp
提问by pfunc
I have been using xampp for a while now without any problem. All of a sudden I start xampp today and I am getting an "Error 403 Access Forbidden" when I try to go to my Localhost.
我已经使用 xampp 一段时间了,没有任何问题。我今天突然启动了 xampp,当我尝试访问我的本地主机时,我收到了“错误 403 访问被禁止”的消息。
When I check the error logs for apache it says:
当我检查 apache 的错误日志时,它说:
[Mon Mar 22 21:48:57 2010] [error] [client 127.0.0.1] client denied by server configuration: D:/xaamp
[Mon Mar 22 21:48:57 2010] [error] [client 127.0.0.1] 客户端被服务器配置拒绝:D:/xaamp
This is strange, it should first of all say "C:" and second of all say "Xampp" (not xaamp). Where would I change this is my config files. Have no idea how this could have happened.
这很奇怪,它首先应该说“C:”,其次应该说“Xampp”(而不是 xaamp)。我会在哪里更改这是我的配置文件。不知道这是怎么发生的。
回答by m1ket
I think this will be an Apache configuration problem. The configuration should be found in your httpd.confat the location below:
我认为这将是一个 Apache 配置问题。该配置应在您httpd.conf的以下位置找到:
\xampp\apache\conf\httpd.conf
Then find this property:
然后找到这个属性:
DocumentRoot
What does it say? It should say:
它说什么?它应该说:
DocumentRoot "C:\xampp\htdocs"

