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

 

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"? :)

<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

-- 
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