Linux Apache reverse Proxy

Source: Internet
Author: User

View Apache Run status

Ps-eaf|grep httpd

View Apache Installation Environment

Httpd-v

View Apache network status, including ports, etc.

Netstat-anp|grep httpd

Open httpd.conf

Verify that the proxy module loading is not commented out

LoadModule proxy_module modules/mod_proxy.soloadmodule proxy_http_module modules/mod_proxy_http.so

Add proxy configuration path at end of file

Proxypass/console http://localhost:8080/consoleProxyPass/images Http://localhost:8080/imagesProxyPassreverse/ http://localhost:8080/

Note the last line, for the root path proxy, be sure to add a slash at the end of the port

You can also configure multiple service paths

Proxypass/pbs Http://172.16.64.141:7080/PBSProxyPassreverse/PBS Http://172.16.64.141:7080/PBSProxyPass/geoserver Http://localhost:8080/geoserverProxyPassreverse/geoserver http://localhost:8080/geoserverProxyPass/http:// localhost:9080/proxypassreverse/http://localhost:9080/

The service Proxypass and proxypassreverse for different ports and addresses are best paired, otherwise there will be errors with redirection failures, such as redirection to localhost.

Note: If a service with a different address is called in a Web project, the path is best written as a relative path. The availability of relative path resources can be ensured by proxy completion.


Reference: Apache Reverse proxy configuration

Linux Apache reverse Proxy

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.