<br><br><div><span class="gmail_quote">On 7/9/07, <b class="gmail_sendername">Les Mikesell</b> <<a href="mailto:lesmikesell@gmail.com">lesmikesell@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Devon Harding wrote:<br>><br>><br>> On 7/9/07, *Les Mikesell* <<a href="mailto:lesmikesell@gmail.com">lesmikesell@gmail.com</a><br>> <mailto:<a href="mailto:lesmikesell@gmail.com">lesmikesell@gmail.com</a>
>> wrote:<br>><br>>     Devon Harding wrote:<br>>      > I'm looking for a redirector like Squid for incoming access based on<br>>      > host name.  I normally use xinet.d, but that only has a one to one
<br>>      > mapping. I would like the redirector route traffic based on the host<br>>      > name of the target.<br>><br>>     You can only do this for http, where the host name is passed in a header<br>
>     from the client.  Apache can do it if you create named virtual hosts<br>>     that use the ProxyPass directive or a RewriteRule with the [P] flag to<br>>     proxy the requests to a backend server.  You'll also need a
<br>>     ProxyPassReverse directive configured to fix redirects issued by the end<br>>     server.<br>><br>><br>> Maybe thats what I need to do, as I need for the same server doing the<br>> proxying to accept http request as well
<br><br>Yes, apache can sort this out itself.  If anything else accepts port 80<br>you'd have to also have a special case to redirect even the local host,<br>perhaps to apache on an alternate port.<br><br>--</blockquote>
<div><br><br>Ok, got it working, but it seems to be redirecting even the localhost.  How can I get the localhost to answer and proxy all other hosts.  Here is my config:<br><br><br>NameVirtualHost *:80<br><VirtualHost *:80>
<br>ServerName <a href="http://www.domain.com">www.domain.com</a><br>ProxyPass / <a href="http://www.domain.com/">http://www.domain.com/</a><br>ProxyPassReverse / <a href="http://www.domain.com/">http://www.domain.com/</a>
<br></VirtualHost><br><VirtualHost *:80><br>ServerName <a href="http://webmail.domain.com">webmail.domain.com</a><br>ProxyPass / <a href="http://webmail.domain.com/">http://webmail.domain.com/</a><br>ProxyPassReverse / 
<a href="http://webmail.domain.com/">http://webmail.domain.com/</a><br></VirtualHost><br></div><br></div><br>