apache 报apache 报 The server is temporarily unable to service your request due to maintenance downtim

用apache 实现反向代理报:

[Tue Nov 17 14:04:32 2015] [error] [client 10.37.238.171] (13)Permission denied: access to /index.html denied
[Tue Nov 17 14:04:32 2015] [error] [client 10.37.238.171] (13)Permission denied: access to /index.html.var denied
[Tue Nov 17 14:04:33 2015] [error] [client 10.37.238.171] (13)Permission denied: access to /favicon.ico denied, referer: http://133.0.191.xxx:7005/


多半原因是因为centos 中启用了setsebool ,并且没有开通相关访问权限所造成的,

可以先通过用getsebool -a |grep http_can_network_connect 来查询相关参数设置情况,

然后开启。开户使用以下参数:


===httpd===
//If you want a particular domain to write to the public_content_rw_t domain
setsebool -P allow_httpd_anon_write=1
or
setsebool -P allow_httpd_sys__anon_write=1
//httpd can be setup to allow cgi s to be executed
setsebool -P httpd_enable_cgi 1
//If you want to allow access to users home directories
setsebool -P httpd_enable_homedirs 1
chcon -R -t httpd_sys_content_t ~user/public_html
//httpd is allowed access to the controling terminal
setsebool -P httpd_tty_comm 1
//such that one httpd service can not interfere with another
setsebool -P httpd_unified 0
//loadable modules run under the same context as httpd
setsebool -P httpd_builtin_ing 0
//httpd s are allowed to connect out to the network
setsebool -P httpd_can_network_connect 1
// You can disable suexec transition
setsebool -P httpd_suexec_disable_trans 1
//You can disable SELinux protection for the httpd daemon by executing
setsebool -P httpd_disable_trans 1

你可能感兴趣的:(apache 报apache 报 The server is temporarily unable to service your request due to maintenance downtim)