假设我的代理服务器地址:111.111.111.111
应用服务器地址: 10.10.10.10
应用tomcat端口:8082
<VirtualHost *:8082>
ServerName 111.111.111.111.8082 #apache所在服务器外网ip地址加端口
#ServerAdmin webmaster@localhost #设置一个邮件地址,服务器有任何问题将发信到这个地址 可去掉
#DocumentRoot /usr/local/alad #放html路径 可去掉
<Directory /usr/local/alad> #这个地址无所谓项目又不在这 随便填
Options FollowSymLinks #不显示目录结构
AllowOverride All
Order allow,deny
ALlow from all
</Directory>
ProxyPreserveHost On
ProxyPass /alad http://10.10.10.10:8082 #把请求转给的应用服务器的ip地址端口
ProxyPassReverse /alad http://10.10.10.10:8082
ErrorLog logs/cy/error.log
CustomLog logs/cy/access.log combined
</VirtualHost>