1.安装软件版本
Apache2.4下载
Apache download http://httpd.apache.org/download.cgi
以下是跟踪链接,可以直接进入对应的下载也
Files for Microsoft Windows
ApacheHaus
2.httpd.conf 配置文件修改
- 修改以下内容
Listen 80
Listen 81
Listen 82
- 取消以下配置
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
- 前的注释去掉
Include conf/extra/httpd-vhosts.conf
3.httpd-vhosts.conf
路径:\conf\extra\httpd-vhosts.conf
添加如下配置
#<VirtualHost _default_:80>
#DocumentRoot "${SRVROOT}/htdocs"
##ServerName auth.example.com:8080
#</VirtualHost>
NameVirtualHost *:80
<VirtualHost *:80>
ServerName auth.example.com
ServerAlias auth.example.com
ProxyRequests Off
<Proxy *>
</Proxy>
ProxyPass / http://auth.example.com:8080/
ProxyPassReverse / http://auth.example.com:8080/
</VirtualHost>
NameVirtualHost *:81
<VirtualHost *:81>
ServerName auth.example.com
ServerAlias auth.example.com
ProxyRequests Off
<Proxy *>
</Proxy>
ProxyPass / http://auth.example.com:8081/
ProxyPassReverse / http://auth.example.com:8081/
</VirtualHost>
NameVirtualHost *:82
<VirtualHost *:82>
ServerName auth.example.com
ServerAlias auth.example.com
ProxyRequests Off
<Proxy *>
</Proxy>
ProxyPass / http://auth.example.com:8080/
ProxyPassReverse / http://auth.example.com:8080/
</VirtualHost>