Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Multiple Internal Web Servers [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
JudgeNik
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2004
Posts: 86
Location: Bolzano, Italy

PostPosted: Thu Apr 07, 2005 7:24 am    Post subject: Multiple Internal Web Servers [SOLVED] Reply with quote

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
View user's profile Send private message
diastelo
Guru
Guru


Joined: 23 Feb 2004
Posts: 521

PostPosted: Thu Apr 07, 2005 1:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
tdi
Apprentice
Apprentice


Joined: 25 Aug 2004
Posts: 170

PostPosted: Thu Apr 07, 2005 1:27 pm    Post subject: Reply with quote

i think it can be configured in such way,
there is soe reason to add ip_addr to vhost /
Back to top
View user's profile Send private message
JudgeNik
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2004
Posts: 86
Location: Bolzano, Italy

PostPosted: Mon Apr 11, 2005 11:18 am    Post subject: all working Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum