急: LAMP 403 禁止访问问题

2017-10-10 04:04:14 +08:00
 MrMike
全新的 Centos 7 + Apache 2 + PHP 5.6 + MySQL 5.6。
配置好域名后,访问网站时,一直是 403 错误。

AH00529: /var/www/****/web/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/***/web/' is executable

vhost 文件:

<VirtualHost *:80>
ServerAdmin info@example.com
DocumentRoot /home/webmaster/public_html/web
ServerName www.example.com
ServerAlias example.com *.example.com
ErrorLog logs/example.com-error_log
CustomLog logs/example.com-access_log common
<Directory "/home/webmaster/public_html/web">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

如果是访问 web 下的文件,也是同样的报错,只是提示某一个文件不能读取。

1,已经将 web 及其父级文件夹都设置成了 777 或 755 可读写权限;
2,关闭了 firewalld 防火墙;
3,关闭了 SELINUX ;

但是依然报 403 错误,请问如何处理?
1513 次点击
所在节点    CentOS
1 条回复
MrMike
2017-10-10 04:51:31 +08:00
还是文件夹权限问题。问题解决,结贴。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/396327

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX