Apache Proxypass appears 503 Service temporarily unavailable how to solve

Source: Internet
Author: User
Tags config 503 service temporarily unavailable apache log tomcat linux

Today, you configure Apache and Tomcat consolidation on REDHAT5 Linux to forward the address of the JSP page to Tomcat's address.

such as the real JSP address for http://127.0.0.1:8080/jsp/

You can also access it by accessing the http://127.0.0.1/jsp/.

So configure Proxypass in Apache:

proxypass/jsp http://localhost:8080/jsp

However, it was found that there were 503 errors when access was found to be inaccessible:

Service temporarily unavailable

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

Apache Server at localhost Port 80

View Apache Log/var/log/httpd/error_log:

[Wed Aug 10 21:02:27 2011] [ERROR] (13) Permission denied:proxy:HTTP:attempt to connect to 10.140.0.109:7080 (127.0.0.1) failed

[Wed Aug 10 21:02:27 2011] [ERROR] Ap_proxy_connect_backend disabling worker for (10.140.0.109)

[Wed Aug 10 20:30:51 2011] [ERROR] proxy:HTTP:disabled connection for (127.0.0.1)

Log/var/log/httpd/access_log:

127.0.0.1--[10/aug/2011:21:02:27-0400] "get/jsp/http/1.0" 503 401 "-" "mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CIBA. NET CLR 2.0.50727;. NET CLR 3.0.4506.2152;. NET CLR 3.5.30729) "

After the investigation and analysis of suspicion is the reason for the selinux, so the view is sure to be:

[root@ logs]#/usr/sbin/getsebool-a |grep http_can_network_connect

Httpd_can_network_connect--> off

So try the solution:

We need to set the Httpd_can_network_connect to on:

[root@ logs]#/usr/sbin/getsebool-p httpd_can_network_connect=1

[root@ logs]#/usr/sbin/getsebool-a |grep http_can_network_connect

Httpd_can_network_connect--> on

Re-access, the page is sure to be accessible.

Another way to solve this problem is to turn off the SELinux directly:

Modify the/etc/selinux/config and reboot:

Selinux=disabled

Or in the form of immediate effect:

[root@ var]#/usr/sbin/setenforce 0

Attached on SELinux:

SELinux (security-enhanced Linux) is the U.S. National Security Service (NSA) implementation of mandatory access control, is linux® The most outstanding new security subsystem. The NSA developed an access control system with the help of the Linux community, under which the process can access only those files needed in his task. SELinux is installed by default on Fedora and Red Hat Enterprise Linux, or as an easy to install package on other distributions.

Ways to turn off SELinux:

Modify the Selinux= "" in the/etc/selinux/config file as disabled and reboot.

If you do not want to reboot the system, use the command Setenforce 0

Note:

Setenforce 1 set SELinux to become enforcing mode

Setenforce 0 Set SELinux to become permissive mode

Increase in the boot parameters of Lilo or grub: selinux=0, or you can turn off SELinux

Getenforce/setenforce View and set the current working mode of SELinux

This article from the "Small Hebebe Technical Space" blog, please be sure to keep this source http://babyhe.blog.51cto.com/1104064/636602

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/web/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.