Troubleshooting of Apache reverse proxy configuration errors in centos

Source: Internet
Author: User

It is not dedicated for server O & M. Therefore, for live activities such as reverse proxy of playing servers, it is basically a site Google. For example, if you set reverse proxy for Apache, it is generally as follows:
Uncomment the module with proxy in httpd. conf (if you do not understand the role of each module, remove it all), such:

Loadmodule proxy_module modules/mod_proxy.so
Loadmodule proxy_connect_module modules/mod_proxy_connect.so
Loadmodule proxy_http_module modules/mod_proxy_http.so
Loadmodule proxy_ftp_module modules/mod_proxy_ftp.so

The following methods take effect in any way. They are copied from the Internet.
Method 1:

<VirtualHost *:80>ServerAdmin xxx@yourdomain.comServerName www.yourdomain.comDocumentRoot /srv/www/htdocsServerSignature OnDirectoryIndex index.php index.html index.htmProxyRequests OffProxyPreserveHost OnProxyPass / http://your.internalserver.local:8080/ProxyPassReverse / http://your.internalserver.local:8080/</virtualhost>

Method 2:

ProxyPass /Test http://127.0.0.1:8080/ProxyPassReverse /Test http://127.0.0.1:8080<proxy  http://127.0.0.1:8080>    AllowOverride None    Order Deny,Allow    Allow from all</proxy>

Method 1 can also be used in a separate virtual path file to facilitate centralized management. This is the same for various servers. Just include them in.

However, this time when I published it to centos6, the following errors were reported:

[Wed Dec 10 20:30:51 2012] [Error] Proxy: http: Disabled connection for (127.0.0.1)

This is not the case when I test it on other Linux platforms. For example, archlinux won't go into the reason, or centos has changed the configuration. Let's change it back.

Sudo/usr/sbin/setsebool-P httpd_can_network_connect 1

Restart httpd, test, successful

Related Article

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.