<VirtualHost *:80>
ServerAdmin 523775@qq.com
DocumentRoot "/var/www/html/"
ServerName www.test.com
ServerAlias test.com
ErrorLog "logs/test.com-error.log"
CustomLog "logs/test.com-access.log" common
Alias /html "/var/www/html/"
<Directory "/var/www/html/">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#正向代理设置,internet选项---连接---局域网设置---代理服务器--填写www.test.com
ProxyRequests On
ProxyVia On
<Proxy *>
Order deny,allow
Deny from all
Allow from 10.0.0.1/8
</Proxy>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin 523775@qq.com
DocumentRoot "/var/www/html/"
ServerName www.abc.com
ServerAlias abc.com
ErrorLog "logs/abc.com-error.log"
CustomLog "logs/abc.com-access.log" common
Alias /html "/var/www/html/"
<Directory "/var/www/html/">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#反向代理设置
ProxyPass / http://www.test.com/
ProxyPassReverse / http://www.test.com/
</VirtualHost>
本文出自 “freeterman” 博客,请务必保留此出处http://myunix.blog.51cto.com/191254/1736228
原文地址:http://myunix.blog.51cto.com/191254/1736228