Mapping domains in a forward proxy
I'm currently running apache on my local machine as a forward proxy server. The config is pretty simple:
ProxyRequests On
ProxyVia On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
However, if a user uses my proxy, I'd like to be able to map certain domains (without touching my hosts file or DNS) to certain directories on my home computer. For example www.example.com to开发者_运维百科 C:\xampp\htdocs\example. I've tried messing around with VirtualHosts and RewriteRules to no avail. Any ideas? Thanks!
Use NoProxy to exclude certain domains, and serve the locally (indeed, with a normal virtualhost configuration) : http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#noproxy
精彩评论