Apache Configure reverse Proxy notes

Source: Internet
Author: User

1. First confirm whether there are mod_proxy.so mod_proxy_balancer.so mod_proxy_http.so three modules under/usr/lib/apache2/modules, if any, in/etc/apache2/ Mods-enabled inside with LN to establish the link, execute the code as follows:

Ln-s/etc/apache2/mods-available/proxy.load/etc/apache2/mods-enabled/proxy.load
Ln-s/etc/apache2/mods-available/proxy_http.load/etc/apache2/mods-enabled/proxy_http.load
Ln-s/etc/apache2/mods-available/proxy_balancer.load/etc/apache2/mods-enabled/proxy_banancer.load

If the mods-enabled directory has proxy.load proxy_http.load proxy_banancer.load The execution succeeds, the domain name is configured as follows:

<virtualhost *:80>

ServerAdmin [email protected]
ServerName #域名
Proxypass/http://www.baidu.com #代理url
Proxypassreverse/http://www.baidu.com #代理url
<directory/>
#options FollowSymLinks
#AllowOver Ride All
</Directory>

</VirtualHost>

So you enter the domain name will jump to Baidu

Apache Configure reverse Proxy notes

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.