LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-04-2003, 04:07 PM   #1
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Rep: Reputation: 15
multiple boxes serving web pages


I've got a quick newbie question. I'm looking a getting another box to serve web content from, but I dont want to toss my old one, is there a way I can use both of them behing a D-Link router? I not quite sure how I would get the requests forwarded to the propper computer. Any advice on what kind of material I should start reading would be a great help.
 
Old 09-04-2003, 04:11 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
If you want both of them to run WWW servers, you have a problem...It can be done (forward certain domains to another machine), but it's not worth the work needed to make it done. I think the best idea is to use one for WWW, second for mail, DNS etc.
 
Old 09-04-2003, 04:32 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Mara is right - without stting up clusters it is difficult to run exactly the same service on more than one machine. If you are hosting database type applications you could use one server for the database and the other for apache.
 
Old 09-04-2003, 09:41 PM   #4
bastard23
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 275

Rep: Reputation: 30
Ahh... stop being so negative :) It could be fun.

peteABK,

As Mara said, it will take some work and it isn't something everyone does, but you should try it. I've never tried this route but... here's something to look at.

You could use Apache's mod_proxy, specifically ProxyPass which does the "reverse proxy". This is a realatively cheap operation for the web server, but it wouldn't solve any bandwidth issues. Combine it with name based virutalhost and you could "serve" two host names from different computers, even if it has to go through just one. You could have an "experimental" server (trying out new PHP scripts/versions) while keeping your main server "stable".

Or, you can run your webservers on different ports. Have the router port forward port 81 (or 8080, or anything you'd like) to a different machine. Setup the second computer to listen on the different port. Use the Listen and ServerName directives. Just make sure to post the different links with the proper port.

Have fun,
chris

PS This post should not keep you from listening to the better advice above. Do whatever you're comforatble with.
 
Old 09-10-2003, 06:40 PM   #5
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
Thanks for all your replies. To clear things up a little for me, if I wanted to run one website on one and a different one on another, would I still be looking at the ProxyPass or would it just be a dns issue?

Also would running one as DNS speed my internet up a little or would it be basically pointless?
 
Old 09-10-2003, 06:45 PM   #6
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
Sorry I guess I should say why I'm doing this. I currently run a site using apache on RH9, I don't know if I should say this in here, but at school we're learning about IIS and I would like to set one up at home to fool around with. I didn't want to partition and shut off my linux, so I'm picked up another cheapy. I'm just limitted on the number of LAN connections to my router so I would like to find out a way to run them both at the same time.
 
Old 09-11-2003, 12:35 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You could run them at the same time but if you want them both to be available from the outside world on one IP address you will need to use different ports or proxying.
 
Old 09-11-2003, 03:16 PM   #8
bastard23
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 275

Rep: Reputation: 30
peteABK,

Sorry for the long answer, but...

I'm just limitted on the number of LAN connections to my router
If the Linux box doesn't have two network cards, then you won't save any ports on the router. Consider buying a cheap hub and some more cable.

Sorry for not being specific, but it's really up to what you want to do. How comfortable are you with networking in general? Are you familliar with Linux in general, configuration files (httpd.conf), and such. How comfortable are you setting up more advanced networking (NAT, firewall, routing)?

would I still be looking at the ProxyPass or would it just be a dns issue?
Both :) If you are using ProxyPass, it just redirects requests to another machine. Virtual hosting allows you to run multiple DNS names from one server. When you combine the two, then you would serve two machine names from "two" computers (one is always involved). It is somewhat inelegant, requires more configuration, and not "simple".

The easiest solution (IMHO) is to have IIS hooked up to the D-link router and have the router do the port forwarding. (My second answer). What will happen is your main site will stay the same (http://www.example.com/) and your second box will use a different port (http://www.example.com:8080/). Just make sure to secure you windows box :) That way you are only configuring IIS and it won't depend on another machine, but hey, that's what you are trying to learn about. How is the Dlink configured now? Is it doing NAT? Do you already have a domain name that you are using?

Also would running one as DNS speed my internet up a little or would it be basically pointless?
Do you want to use the DNS locally? It can speed some things up, and it lets you setup multiple computers on your network easier. Serving up your own domain to the internet will be a bit more complex. Personally, I would setup a DNS server on your redhat box, but don't let the internet access your DNS service (port 53). Just serve to your other machines. Then use one of the "free" DNS server companies (I've used http://www.zoneedit.com) to serve DNS over the internet.

If you have any more questions, you may want to describe how you have everything networked together. The more specific your questions, the more specific we can be.

Have fun,
chris
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache not serving pages bcf2 Linux - Software 1 11-22-2005 03:46 AM
ADSL Router Web configuration pages appears instead of Personal Web Server Pages procyon Linux - Networking 4 12-20-2004 05:44 PM
Squid - Serving stale pages cli_man Linux - Software 0 12-08-2003 08:45 AM
Question about Multiple web pages in apache SSBN Linux - Networking 10 05-01-2003 10:18 AM
serving web pages on another port iggymac Linux - Networking 3 03-21-2002 01:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration