阿帕奇给予403禁止错误 [英] Apache giving 403 forbidden errors

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

问题描述

好了,我已经previously设置了两个虚拟主机和他们的工作凉爽。他们俩的房子简单的web项目,并与 HTTP做工精细:在浏览器//项目2 :// PROJECT1 和 HTTP

Ok, so i've previously set up two virtual hosts and they are working cool. they both house simple web projects and work fine with http://project1 and http://project2 in the browser.

反正我来添加其他虚拟主机。我编辑/ etc / hosts中有127.0.0.1是project3文件,同时更新通过复制在httpd-vhosts.conf文件,并粘贴previous项项目2和编辑文件路径。

Anyway, I've come to add another vhost. I edited the /etc/hosts file with 127.0.0.1 project3 and also updated the httpd-vhosts.conf file by copy and pasting the previous entries for project2 and editing the file path.

我已经检查了所有的文件和文件夹的权限(其实我复制和粘贴项目2),并只需在index.php文件放在一个Hello World的消息。

I've checked all the file and folder permissions (in fact I copied and pasted from project2) and simply put a "hello world" message in the index.php file.

在访问时,我得到一个403禁止的权限被拒绝的消息的http://项目3

I get a 403 forbidden permission denied message when accessing http://project3

这是为什么,我只是想出我已经错过了什么步骤,因为一切似乎都树立正确的。

Why is this, I just can figure out what step I've missed as everything seems to be set up correct.

先谢谢了。

推荐答案

检查:


  • Apache可以物理访问文件(即运行Apache用户,可能是WWW的数据或Apache,可以访问文件系统中的文件)

  • Apache可以列出文件夹的内容(读取权限)

  • 阿帕奇具有该文件夹中的允许指令。应该有一个的/ var / www /,脚本可以检查默认虚拟主机,例如

此外,你可以看看error.log文件(通常位于/var/log/apache2/error.log)为什么你的403错误到底是哪会形容。

Additionally, you can look at the error.log file (usually located at /var/log/apache2/error.log) which will describe why you get the 403 error exactly.

最后,你可能需要重新启动Apache,只是为了确保所有的配置应用。
这可以用 /etc/init.d/apache2重启被普遍完成。在一些系统中,该脚本将被调用的httpd。只是弄清楚。

Finally, you may want to restart apache, just to be sure all that configuration is applied. This can be generally done with /etc/init.d/apache2 restart. On some system, the script will be called httpd. Just figure out.

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

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