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