Linux下Apache部署503问题

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.


Apache/2.2.15 (CentOS) Server at www.hacpyzlglb.net Port 80

查看cpache log:
[Fri Jun 27 16:08:32 2014] [error] ap_proxy_connect_backend disabling worker for (xx.xx.98.34)
[Fri Jun 27 16:12:23 2014] [error] (13)Permission denied: proxy: HTTP: attempt to connect to xx.xx.98.34:1080 (xx.xx.98.34) failed
[Fri Jun 27 16:12:23 2014] [error] ap_proxy_connect_backend disabling worker for (xx.xx.98.34)
[Fri Jun 27 16:12:23 2014] [error] proxy: HTTP: disabled connection for (xx.xx.98.34)
执行
[root@log]#/usr/sbin/getsebool -a |grep httpd_can_network_connect
httpd_can_network_connect --> off
httpd_can_network_connect_cobbler --> off
httpd_can_network_connect_db --> off

于是尝试解决方案:
  我们需要将httpd_can_network_connect设置为on: 
  [root@ logs]# /usr/sbin/setsebool -P httpd_can_network_connect=1   
  [root@ logs]# /usr/sbin/getsebool -a |grep httpd_can_network_connect 
  httpd_can_network_connect --> on      
  重新访问,页面果然可以访问了。 
另外直接关掉SELinux也是可以解决这个问题的: 
修改/etc/selinux/config 然后重启: 
   SELINUX=disabled     或者实时生效的方式:  
   [root@ var]# /usr/sbin/setenforce 0  

转自http://blog.sina.com.cn/s/blog_40ce02d70102uw1m.html

你可能感兴趣的:(Linux下Apache部署503问题)