关于Permission denied: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable的一种解决方式。
- 访问网站没有权限
- 查看Apache的log输出“Permission denied: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable”错误
解决方法:
- 先给.htaccess文件权限,看能否解决“chmod 777 .htaccess”为了更直观先把权限给成最大的试试
- 第一步解决不了然后将整个工程目录给上权限再试试
- 以上两种方式都解决不了,尝试以下方式:
在centos中停止selinux,执行以下命令
setenforce 0
cd /etc/selinux
cp -p config config.org
vim config
# 将里面的SELINUX修改为下面的值
##SELINUX=enforcing
SELINUX=disabled
# 重启
reboot