---------- Forwarded message ----------
From: Jeremiah Foster <jeremiah.fos...@pelagicore.com>
Date: 2011/4/20
Subject: Re: Två olika apache-servrar till olika domänadresser på samma lan
To: Philip Lundqvist <philiplundqv...@gmail.com>


2011/4/13 Philip Lundqvist <philiplundqv...@gmail.com>

> Jag vill köra olika maskiner för att fördela lasten.
>

If you're looking for load balancing you probably don't want to do that in
Apache. You want to look into round-robin DNS or other ways, like proxying,
to balance the load.

>
> Just nu verkar det som om proxy är den bästa lösningen på mitt problem
> hittills. Jag kör däremot samma programvara (Apache) på båda servrarna, som
> någon var inne på.
>

A proxy is likely going to be the best solution. Look at Varnish and Squid,
both of which have excellent support for this type of situation.

>
> Som det också nämnts tidigare så vill jag att första servern ska kunna nås
> på ett domännamn och den andra servern via ett annat. Båda står däremot
> bakom samma WAN-ip.
>

Now you are no longer doing load balancing, you are serving different
virtual hosts. This is trivial to do in Apache the documentation explains it
clearly. But, if you proxy www.example.com and send it to both servers, you
will have to have both servers serve up data for www.example.com. Of course
you can have different subdomains like www1 and www2, but that is not nice
to clients that use bookmarks.


> Fungerar proxyn även för subdomäner? Dvs. kan jag skicka requests på
> <http://sub.example.com>sub.example.com och <http://www.example2.com>
> www.example2.com till samma server även genom proxyn?
>

Yes. Squid är din kompis!
http://wiki.squid-cache.org/ConfigExamples/Reverse/MultipleWebservers

Regards,

Jeremiah


>
> Med Vänlig Hälsning
> Philip Lundqvist
>
> 13 apr 2011 kl. 14:53 skrev Anders Jackson < <anders.jack...@gmail.com>
> anders.jack...@gmail.com>:
>
> Tjat, DU är inte Cc:ad, som du påstod, om vi skall vara noggrann.
> Ja, jag vet att den är sub-optimal Androids Gmail-klient, det var inte det
> jag frågade om...
>
> Det går utmärkt att köra på vhost, och det framkom inte i frågan någon
> anledning att använda någon annan lösning.
> Snarare att frågeställaren missat den möjligheten.
>
> Sitter man bakom NAT så är det troligen mycket större problem med det om
> man har hög last på servern. Det är då troligen mer begränsande med trafiken
> genom den. Om det inte är så, så finns det troligen andra lösningar som är
> effektivare än att köra två servrar istf en med vhost. Som att komprimera
> trafiken från servern eller indexera databasen. Inte slänga på mer
> hårdvara...
>
> Den 13 apr 2011 14.22, "Olof Johansson" < <o...@ethup.se> <o...@ethup.se>
> o...@ethup.se> skrev:
>
> On 2011-04-13 14:14 +0200, Anders Jackson wrote:
> > (Är du CC:ad? Kan jag inte se. :-)
> > Jag sitter f...
> (
>  To: Olof Johansson < <o...@ethup.se> <o...@ethup.se>o...@ethup.se>
>
> Cc: 
> <debian-user-swedish@lists.debian.org><debian-user-swedish@lists.debian.org>
> debian-user-swedish@lists.debian.org
>   Dålig klient ;-)
>
> )
>
> > Jag såg att han ville köra två web-siter. Vilket man ju inte normalt
> löser
> > med två Apatche-se...
> Ofta kan man lösa det med vhosts, men det är dumt att köra tunga
> applikationsservrar på samma maskin som annat, om man kan undvika
> det.
>
> --
>
> - Olof Johansson
> - www: <http://www.stdlib.se/> <http://www.stdlib.se/>
> http://www.stdlib.se/
> - {mail,xmpp}: <o...@ethup.se> <o...@ethup.se>o...@ethup.se
>
> - irc: zibri on Freenode/OFTC/IRCnet/...
> --
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk2llYIACgkQCPS7eH/A+7r9xACfQDu+dypfrpvOJVR6jugFsrvM
> KpsAn2/us3T5fFhQJJKl8meNp68ryUo1
> =b55k
> -----END PGP SIGNATURE-----
>
>


-- 
=============================================
Jeremiah C. Foster
Open Source Technologist
Pelagicore AB
Ekelundsgatan 4, 6tr, SE-411 18 Gothenburg, Sweden
Mobile: +46 (0)730 93 0506
E-Mail: jeremiah.fos...@pelagicore.com
=============================================

=== NOTE ===
The information contained in this E-mail message is
intended only for use of the individual or entity
named above. If the reader of this message  is not
the intended recipient, or the employee or agent
responsible to deliver it to the intended recipient,
you are hereby notified that any dissemination,
distribution or copying of this communication is
strictly prohibited.
=============




-- 
=============================================
Jeremiah C. Foster
Open Source Technologist
Pelagicore AB
Ekelundsgatan 4, 6tr, SE-411 18 Gothenburg, Sweden
Mobile: +46 (0)730 93 0506
E-Mail: jeremiah.fos...@pelagicore.com
=============================================

=== NOTE ===
The information contained in this E-mail message is
intended only for use of the individual or entity
named above. If the reader of this message  is not
the intended recipient, or the employee or agent
responsible to deliver it to the intended recipient,
you are hereby notified that any dissemination,
distribution or copying of this communication is
strictly prohibited.
=============

Till