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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值