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