D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Conditional HTTP redirects based on URL

 

On Fri, 05 Jun 2009 12:59:38 +0100
James Fidell wrote:

> Grant wrote:
> 
> > I would like:
> > 
> > remote.domain.tld -> domain.dyndns.org -> our ADSL -> Apache2 -> SBS
> > device.domain.tld -> domain.dyndns.org -> our ADSL -> Apache2 ->
> > the device media.domain.tld -> domain.dyndns.org -> our ADSL ->
> > Apache2's own vhost
> 
> Yes.  What's the emoticon for "blue in the face"? :)

What's the emoticon for "the documentation seems somewhat lacking and
although it explains the directives it doesn't seem to explain how to
actually use them"? :p

> <VirtualHost *:80>
>   ServerName media.domain.tld
>   DocumentRoot ...
>   ...
> </VirtualHost>
> 
> <VirtualHost *:80>
>   ServerName remote.domain.tld
>   ...
>   ProxyRequests Off
>   ProxyPreserveHost On
>   <Proxy *>
>     Order deny,allow
>     Allow from all
>   </Proxy>
> 
>   ProxyPass / http://<sbs-hostname>/
>   ProxyPassReverse / http://<sbs-hostname>/
> </VirtualHost>
> 
> <VirtualHost *:80>
>   ServerName device.domain.tld
>   ...
>   ProxyRequests Off
>   ProxyPreserveHost On
>   <Proxy *>
>     Order deny,allow
>     Allow from all
>   </Proxy>
> 
>   ProxyPass / http://<device-hostname>/
>   ProxyPassReverse / http://<device-hostname>/
> </VirtualHost>
> 
> James

Thank you James.  Obviously the appropriately tweaked versions worked
perfectly.  I wasn't looking for a "I-did-it-for-you" answer - just
some guidance on what I was doing wrong.  I can now see what I was
doing wrong, so thank you again. :)

Cheers.
Grant.

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html