用apache做反向代理实例

用apahce也可以实现web的反向代理,以给ghs.google.com做反向为例,apache的写法:

VirtualHost *:80>

ServerName isme.com.ru

ProxyRequests off

<Proxy *>

Order deny,allow

Allow from all

</Proxy>

ProxyPreserveHost on

ProxyPass / http://ghs.google.com/

ProxyPassReverse / http://ghs.google.com/

</VirtualHost>

<VirtualHost 173.212.195.x:80>

ProxyRequests off

<Proxy *>

Order deny,allow

Allow from all

</Proxy>

ProxyPreserveHost on

ProxyPass / http://ghs.google.com/

ProxyPassReverse / http://ghs.google.com/

</VirtualHost>

This entry was posted in Apache, 随笔 and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>