View previous topic :: View next topic |
Author |
Message |
JudgeNik Tux's lil' helper


Joined: 02 Mar 2004 Posts: 86 Location: Bolzano, Italy
|
Posted: Thu Apr 07, 2005 7:24 am Post subject: Multiple Internal Web Servers [SOLVED] |
|
|
I am trying to get a network running with multiple machines serving websites over a single internet connection.
Code: |
[ proxy/dns/webserver1 ]
|
(Internet) -- [modem] -- switch -- [ webserver2 ]
|
[ webserver3 ]
|
So far I've tried using just squid and the httpd_accel options (with bind as DNS server) in the conf file without any success.
Does anyone know of a program I can install to "act" as a webserver, but forwards the requests to different servers depending on hostnames in the headers.
I basically want to do what Shorewall can do based on ports with DNAT except based on hostnames... _________________ See the famous Niko Roberts at http://www.nikoroberts.com
Last edited by JudgeNik on Mon Apr 11, 2005 11:18 am; edited 1 time in total |
|
Back to top |
|
 |
diastelo Guru


Joined: 23 Feb 2004 Posts: 521
|
Posted: Thu Apr 07, 2005 1:22 pm Post subject: |
|
|
This sounds very similar to Apache's virtual hosting. Perhaps Apache itself can be configured to handle the requests you want. _________________ "No question is so difficult to answer as that to which the answer is obvious" -- George Bernard Shaw |
|
Back to top |
|
 |
tdi Apprentice

Joined: 25 Aug 2004 Posts: 170
|
Posted: Thu Apr 07, 2005 1:27 pm Post subject: |
|
|
i think it can be configured in such way,
there is soe reason to add ip_addr to vhost / |
|
Back to top |
|
 |
JudgeNik Tux's lil' helper


Joined: 02 Mar 2004 Posts: 86 Location: Bolzano, Italy
|
Posted: Mon Apr 11, 2005 11:18 am Post subject: all working |
|
|
Managed to get it to serve a site and act as a http accelerator by using two (2) network cards in the machine and binding the services to them. Then accelerating the correct websites to ALL of the right servers.
/etc/squid/squid.conf:
Code: |
...
#My first network card address (the one that port 80 externally is forwarded to)
http_port 192.168.0.1:80
...
httpd_accel_host virtual
httpd_accel_port 0
...
httpd_accel_uses_host_header on
...
|
/etc/hosts
Code: |
...
127.0.0.1 localhost
# My other network card's address
192.168.0.2 www.mywebsite.com
# My other servers on the network
192.168.0.3 www.myotherwebsite.com
192.168.0.4 www.heyigotmore.com
192.168.0.5 www.ilovemysquid.com
|
_________________ See the famous Niko Roberts at http://www.nikoroberts.com |
|
Back to top |
|
 |
|