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

 

<E1MCCzs-00064j-EZ@xxxxxxxxxxxxxxxxxxx> <4A27F9D3.9010509@xxxxxxxxxxxxxx>
Message-ID: <3d19dfcc7486a4954320cb379565b114@localhost>
X-Sender: dcglug@xxxxxxxxxxxx
Received: from 91.85.195.142 [91.85.195.142] with HTTP/1.1 (POST); Fri, 05 Jun
        2009 09:54:25 +0100
User-Agent: RoundCube Webmail/0.1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit


On Thu, 04 Jun 2009 17:44:03 +0100, Simon Waters <simon@xxxxxxxxxxxxxx>
wrote:
> Grant wrote:
>>
>> Having a read through
> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
>> and the "guide" here (http://www.apachetutor.org/admin/reverseproxies),
> it
>> seems that these implementations are expecting this:
>>
>> http://someserver.domain.tld/app1 -> server1's http
>> http://someserver.domain.tld/app2 -> another http server
>>
>> I'm looking for a way to decide where the proxy forwards traffic based
> on
>> the someserver.domain.tld bit.
>>
>> Am I reading the documentation wrong?
> 
> Proxy directive can go in server root, but don't you just want a virtual
> host with the name of the IIS server with Apache proxying all requests
> for that server?
> 
> The whole set-up sounds rather convoluted to me.
> 
> i.e.
> 
> virtualhost remote....
>   do normal hosting stuff here
> 
> virtualhost demo....
>   (reverse) proxy everything to IIS server

OK, from the top:

We have domain.tld DNS hosted by 1&1 (we have 4 dedicated Linux servers
with them also).  The bulk of our subdomains are hosted on one of these 1&1
servers.

We have a machine in our office that runs SBS2008 and Debian Lenny as
virtual machines.  The SBS2008 machine is setup and expects to be on
remote.domain.tld.

Since we have 2 ADSL lines in the office running as fail-overs, I have
setup a DynDNS client on the SBS virtual machine.  I have added a CNAME
entry in our 1&1 DNS as such: remote.domain.tld -> domain.dyndns.org.

Currently our office routers are setup to forward all incoming :80 and :443
traffic to the SBS virtual machine.  This works nicely and users can get to
the SBS machine using "remote.domain.tld" from anywhere.

I have installed Apache2 (and PHP, Perl, etc, etc) on the Debian machine
and we would like to host various sites on there.  One possibility is
Gallery (already installed and running, but only accessible internally) -
possibly accessible to the outside world via "media.domain.tld".

We also have a network device in the office (it shows energy usage data)
that we would like to be visible to the outside world through
"devicename.domain.tld".

I don't want to be in the situation of having to apply weird and wonderful
ports to everything so the redirects can be handled by the router.

I know that Apache2 can handle redirecting traffic.

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

Is this do-able?

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