LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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-12-2004, 09:06 AM   #1
jme
Member
 
Registered: Sep 2003
Location: Cardiff, UK
Distribution: Debian
Posts: 49

Rep: Reputation: 15
Internal DNS server needed??


Hey guys.

Soon I will have two web servers sat behind my firewall (smoothwall). At the moment things are pretty simple as I just forward any port 80 requests to the one webserver, but when I get the second server I will need to forward different requests to different machines depending on what domain they are for.

Basically how do I go about this and is it a internal DNS server that I require. Im not looking for someone to give me a complete run down of what to do, but it's a case of not knowing what to look for!

Thanks guys.

Jamie
 
Old 09-12-2004, 12:44 PM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
You do not need to have 2 machines to do this. All you need do is configure virtual hosting in apache. There are lots of howto's on this just do a google search on virtual domain hosting. This is how the isp's do their hosting.
 
Old 09-12-2004, 01:07 PM   #3
jme
Member
 
Registered: Sep 2003
Location: Cardiff, UK
Distribution: Debian
Posts: 49

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by TigerOC
You do not need to have 2 machines to do this. All you need do is configure virtual hosting in apache. There are lots of howto's on this just do a google search on virtual domain hosting. This is how the isp's do their hosting.
I understand virtual hosting - each server is hosting many different sites, but this isn't really related to something as simple as that! If only it was

Becasue of a few problems that a friend is having while moving house, he is moving his server to my house for a few weeks so that his site will still be up. This will be connected to the switch which in on my DMZ with a static IP. I need to know what I have to do to make any requests for the sites on my server go to 192.168.1.195 (my webserver) and those for my friends server to go to 192.168.1.200.

Any ideas are welcome.

Thanks for your response though TigerOC.

Cheers, Jamie
 
Old 09-19-2004, 08:20 AM   #4
jme
Member
 
Registered: Sep 2003
Location: Cardiff, UK
Distribution: Debian
Posts: 49

Original Poster
Rep: Reputation: 15
Anyone?
 
Old 09-19-2004, 11:25 AM   #5
netopia
LQ Newbie
 
Registered: Sep 2004
Location: Boston, MA
Distribution: fedora core 2
Posts: 28

Rep: Reputation: 15
I am pretty sure a setup like this isn't possible. The way virtual servers in apache work is this (we'll start from the top of http - 24.x.x.x is your house's IP address)
a web browser looks up www.example.com and gets 24.168.0.1
It opens a connection on port 80 to 24.168.0.1
it says
GET / HTTP/1.1
Host: www.example.com

and from the host header Apache knows which page to serve
Now what you're saying is that www.example.com and www.example2.com will both be pointed at 24.168.0.1 (your house) while your friend's server is there. But web browsers, when they open a connection to your house, aren't specifying the host name. they are only specifying IP address - until the connection is open, i.e. they are already talking to one web server or the other, and it is too late for you to decide which server they should be talking to.

So, you need either:
a) two EXTERNAL (real) IP addresses that can each be pointed to one of the web servers
b) some sort of script on your existing web server that could serve up pages from the other. This wouldn't be too hard to write in PHP or Perl but if you don't already know how to do that, it's not going to be easy to explain in this venue.
 
Old 09-30-2004, 07:53 PM   #6
slightcrazed
Member
 
Registered: May 2003
Location: Lisbon Falls, Maine
Distribution: RH 8.0, 9.0, FC2 - 4, Slack 9.0 - 10.2, Knoppix 3.4 - 4.0, LFS,
Posts: 789

Rep: Reputation: 30
Behind a router?

Virtual hosting might actually work. Turn your friends box into an NFS server and have it serve the directory where his WWW files are, then you set up your box w/ virtual hosting, mount the NFS share and have the DocumentRoot set to the mount point. Basically you'll be piggy backing his box on yours. Its a bloody awful work around, but it will probably work for the time being.

The only other option I see would be to have your friend set his site to a port other than 80.... he would have to set up a redirector so that requests for his web page come into a port other than 80, and then your router forwards that port to his box, but that could potentially be alot more work.

slight
 
  


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
help needed to setup a DNS server can anyone say how to configure a DNS server subha Linux - Networking 4 04-28-2012 12:50 AM
Setup Internal DNS Server loufeliz Linux - Networking 1 01-28-2005 02:59 PM
Running internal DNS server with Astaro firewall jester_69 Linux - Security 0 01-20-2005 07:47 PM
dns and 500 internal server error.. Flawless Slackware 4 08-24-2003 12:08 AM
Internal DNS server / Webserver MightyCranium Linux - Networking 6 04-02-2003 02:17 AM


All times are GMT -5. The time now is 03:18 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration