Apache ProxyPass 出现503 Service Temporarily Unavailable
在CentOS上配置Apache和Tomcat整合,因为之前windows已经配置好,所以httpd.conf就直接复制代码上去了。发现一直报错。<VirtualHost *:80> #域名 ServerName amap.jww.cn #DocumentRoot /var/www/catlog ErrorLog "/var/www/catlog/error.log" CustomLog "/var/www/catlog/common.log" common #反向代理Begin ProxyPass /images ! ProxyPass /css ! ProxyPass /js ! #可多对 ProxyPass / http://127.0.0.1:8080/ ProxyPassReverse / http://127.0.0.1:8080/ #反向代理END</VirtualHost>查看日志发现报错Service Temporarily UnavailableThe 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 amap.jww.cn Port 80
(13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (127.0.0.1) failed ap_proxy_connect_backend disabling worker for (127.0.0.1)问渡娘后得知是是SELinux的原因,httpd不能防问网络# /usr/sbin/getsebool -a |grep httpd_can_network_connecthttpd_can_network_connect --> offhttpd_can_network_connect_cobbler --> offhttpd_can_network_connect_db --> off#更改SELinux设置# /usr/sbin/setsebool -P httpd_can_network_connect=1# /usr/sbin/getsebool -a |grep httpd_can_network_connecthttpd_can_network_connect --> onhttpd_can_network_connect_cobbler --> offhttpd_can_network_connect_db --> off#另外关掉SELinux也是可以解决这个问题
修改/etc/selinux/config 然后重启:<div class="quote_title">引用
页:
[1]