|
|
|
|
|
|
| Author |
Message |
sven.clement@gmail.com *nix forums beginner
Joined: 12 Jul 2006
Posts: 2
|
Posted: Wed Jul 12, 2006 7:46 pm Post subject:
One public IP but multiple servers (with different domains)
|
|
|
Hi,
As I searched now for sometime and doesn't find anything really helpful
to me I'm asking my question in this newsgroup.
My current setup is, that I have one Gateway/Firewall Server setup with
two NIC's:
eth0: 1.2.3.4
eth1: 192.168.10.1
This gateway is configured at the moment to forward all the traffic on
port 80 to 192.168.10.20
But now, we have the problem that we need more server capacity and also
one Windows Webserver which should be available under the same IP (but
an other domain name).
So my question is, is there any software which allows me to configure
my gateway in a way that my server is forwarding like the following
sheme?
www.one.org --> 192.168.10.20
www.two.org --> 192.168.10.21
I hope I described the problem enough to solve it, if not, so I will
try to answer all your questions.
Thanks for your help in advance,
Sven Clement |
|
| Back to top |
|
 |
Dave {Reply Address in.Si *nix forums beginner
Joined: 04 Jan 2006
Posts: 19
|
Posted: Wed Jul 12, 2006 8:59 pm Post subject:
Re: One public IP but multiple servers (with different domains)
|
|
|
sven.clement@gmail.com wrote:
| Quote: | Hi,
As I searched now for sometime and doesn't find anything really helpful
to me I'm asking my question in this newsgroup.
My current setup is, that I have one Gateway/Firewall Server setup with
two NIC's:
eth0: 1.2.3.4
eth1: 192.168.10.1
This gateway is configured at the moment to forward all the traffic on
port 80 to 192.168.10.20
But now, we have the problem that we need more server capacity and also
one Windows Webserver which should be available under the same IP (but
an other domain name).
So my question is, is there any software which allows me to configure
my gateway in a way that my server is forwarding like the following
sheme?
www.one.org --> 192.168.10.20
www.two.org --> 192.168.10.21
I hope I described the problem enough to solve it, if not, so I will
try to answer all your questions.
If the server capacity is just multiple machines serving the same pages |
then you just need a load balancer on the input that will route requests
to different machines. Go and check out whether squid can help, it's
capable of being a load balancer among other things.
--
Dave
mail da ve@llondel.org (without the space)
http://www.llondel.org
So many gadgets, so little time |
|
| Back to top |
|
 |
sven.clement@gmail.com *nix forums beginner
Joined: 12 Jul 2006
Posts: 2
|
Posted: Wed Jul 12, 2006 9:23 pm Post subject:
Re: One public IP but multiple servers (with different domains)
|
|
|
Thanks to you Dave,
I was also planning to implement squid, but my main problem is that I
need to implement a second server running windows which will display
different pages (in aspx) So Squid can't handle this I think.
Sven |
|
| Back to top |
|
 |
Dave {Reply Address in.Si *nix forums beginner
Joined: 04 Jan 2006
Posts: 19
|
Posted: Thu Jul 13, 2006 6:24 am Post subject:
Re: One public IP but multiple servers (with different domains)
|
|
|
sven.clement@gmail.com wrote:
| Quote: | Thanks to you Dave,
I was also planning to implement squid, but my main problem is that I
need to implement a second server running windows which will display
different pages (in aspx) So Squid can't handle this I think.
I don't think anything can - at the instant of connection, the only |
information available is that an IP address Out There wants to connect
to your server on a particular port. It has no idea what the user might
have typed.
What you can do is put the Windows server on port 81 or some other port
and arrange a redirect, so that the initial connect comes in to the
Linux server and it redirects to something on port 81. That way there
would be a second connect transparent to the user that would access the
Windows machine directly.
Otherwise I don't think there's a way of achieving what you want.
--
Dave
mail da ve@llondel.org (without the space)
http://www.llondel.org
So many gadgets, so little time |
|
| Back to top |
|
 |
Dan *nix forums addict
Joined: 29 Aug 2005
Posts: 77
|
Posted: Thu Jul 13, 2006 7:37 am Post subject:
Re: One public IP but multiple servers (with different domains)
|
|
|
On Wed, 12 Jul 2006 12:46:16 -0700, sven.clement wrote:
| Quote: | So my question is, is there any software which allows me to configure my
gateway in a way that my server is forwarding like the following sheme?
www.one.org --> 192.168.10.20
www.two.org --> 192.168.10.21
|
Apache web server has a port forwarding feature. Run it on your gateway
and configure it to forward the requests to the appropriate server. You
want to set up a reverse proxy.
Have a look at the apache doco:
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html
Dan |
|
| Back to top |
|
 |
Raqueeb Hassan *nix forums Guru Wannabe
Joined: 08 Apr 2005
Posts: 123
|
Posted: Fri Jul 14, 2006 12:16 pm Post subject:
Re: One public IP but multiple servers (with different domains)
|
|
|
<snip>
| Quote: | What you can do is put the Windows server on port 81 or some other port
and arrange a redirect, so that the initial connect comes in to the
Linux server and it redirects to something on port 81. That way there
would be a second connect transparent to the user that would access the
Windows machine directly.
|
Dave,
That's a brilliant idea. The gateway machine will forward port 80 and
81 to machine 192.168.10.20 and 192.168.10.21 respectively. Now, (I'm
not sure, though) how would the first machine, say 192.168.10.20 know
that browser actually requested for www.two.org? I guess, the problem
has already been taken care of when those ports are forwarded to
separate machines. So, we don't need to redirect the port 81 from first
web server, when it has already forwarded. What do you think?
You are right, this is difficult.
The users of windows web server need to type extra www.two.org:81 or it
has to be redirected externally.
--
Raqueeb Hassan
Bangladesh |
|
| Back to top |
|
 |
Dan *nix forums addict
Joined: 29 Aug 2005
Posts: 77
|
Posted: Mon Jul 17, 2006 1:09 am Post subject:
Re: One public IP but multiple servers (with different domains)
|
|
|
On Fri, 14 Jul 2006 05:16:10 -0700, Raqueeb Hassan wrote:
| Quote: | You are right, this is difficult.
|
No it's not. The answer is in my previous post. Use the reverse proxy
feature of Apache web server. No need for different ports, no need for
the user to add a :81 to the url. Could be set up either on the gateway
machine, or the gateway could be set up to port forward all requests to
one server and it forwards the ones it doesn't host to the other server.
Dan |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Mon Dec 01, 2008 11:40 pm | All times are GMT
|
|
Mortgage Calculator | Buy Playstation 3 | Credit Cards | Web Advertising | Secured Loans
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|