Apache reverse proxy settings

Source: Internet
Author: User

Environment:

Debian7.5 + apache2.2.24 (wdcp/wdlinux)

1. Go to the proxy directory of the Apache source code package:

cd /v/softs/lanmp/httpd-2.2.24/modules/proxy

2. Run the apxs command to compile mod_proxy.so:

sudo /www/wdlinux/apache/bin/apxs -c -i -a mod_proxy.c mod_proxy_connect.c mod_proxy_http.c proxy_util.c

  # After the command is complete, the mod_proxy.so file is automatically created in the Apache/modules directory.

# Automatically add loadmodule proxy_module modules/mod_proxy.so to httpd. conf
  

3. Manually Add the following in httpd. conf:

LoadModule proxy_http_module modules/mod_proxy.so

4. VM settings:

<VirtualHost *:80>  ServerAdmin [email protected]  ServerName test.netmtg.com  ProxyRequests Off  <Proxy *>    Order deny,allow    Allow from all  </Proxy>  ProxyPass /test http://127.0.0.1:9999/testproxy  ProxyPassReverse /test http://127.0.0.1:9999/testproxy</VirtualHost>

5. Test

Accessing http://test.netmtg.com/test in a browser

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.