You are here

apache无权访问问题的解决

g089h515r806 的头像
Submitted by g089h515r806 on 星期六, 2019-02-16 08:47

问题:

You don't have permission to access / on this server apache 2.2.15

 

检查日志发现问题:

 

htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

 

搜索:

https://stackoverflow.com/questions/15607300/htaccess-pcfg-openfile-unable-to-check-htaccess-file-ensure-it-is-readable-and

 

原因,启用了selinux,导致不正常。

禁用selinux:   setenforce 0  临时关闭。

恢复正常.

 

修改/etc/selinux/config 文件

SELINUX=enforcing改为SELINUX=disabled

 

下面的两行命令,也能半部分恢复正常,但是个别网站的mysql有问题。

setsebool -P httpd_enable_homedirs true

chcon -R -t httpd_sys_content_t /home/www/html/


论坛:

Drupal版本: