LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-24-2008, 05:12 PM   #1
Goce
LQ Newbie
 
Registered: Nov 2008
Location: Eugene, OR
Distribution: Ubuntu Linux 8.04
Posts: 7

Rep: Reputation: 0
Question How to DNS locally to serve two different websites?


How do I DNS Server two websites from my computer. The problem I'm having is that I want to serve two websites from my computer at once but only have one port 80 to use for web interface..

IE;
My host redirect = basolo.no.ip.org
Goes direct to my IP or server..

My 1st site = gw.basolo.no-ip.org
Goes to my htdocs/galacticwars directory

My 2nd site = fish.basolo.no-ip.org
Goes to my htdocs/fishing directory

Is this possible through Suse Linux 11.0 distrobution? Is there a way to set this up? I know there is a wizard, but all of it seems so complicated. I can code a PHP/MySQL game but I can't figure this out?! Hrmm... Pretty frustrating! Can anyone help me? Thanks!

Rather frustrated,
-Goce-
 
Old 11-24-2008, 06:24 PM   #2
nathacof
Member
 
Registered: Aug 2004
Location: Bear, DE, USA
Distribution: Slackware 11, CentOS 5.2, Ubuntu
Posts: 124

Rep: Reputation: 17
If you are running Apache, which is basically the defacto standard, you are looking to configure VirtualHosts.

Basically you need to define the shared IP like so:

Code:
NameVirtualHost 192.168.1.80:80
Then add your sites like so:

Code:
<VirtualHost 192.168.1.80:80>
  ServerName site1.example.com
  [...]
</VirtualHost>


<VirtualHost 192.168.1.80:80>
  ServerName site2.example.com
  [...]
</VirtualHost>
Reference: http://httpd.apache.org/docs/2.2/vhosts/

If you are trying to adjust DNS for your local computer only, you'll be interested to read about the hosts file.

Reference: http://en.wikipedia.org/wiki/Hosts_file

Last edited by nathacof; 11-24-2008 at 06:27 PM.
 
Old 11-25-2008, 08:37 AM   #3
Goce
LQ Newbie
 
Registered: Nov 2008
Location: Eugene, OR
Distribution: Ubuntu Linux 8.04
Posts: 7

Original Poster
Rep: Reputation: 0
Arrow Thanks!

Thank you. I think I can do it through vhost then. I will read up. Which file do you alter/enter your code in to? I'm using Suse 11.0 for my web server. Thanks again and hope to hear back from you!

Good day,
-Goce-
 
Old 11-25-2008, 08:49 AM   #4
yandos
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Rep: Reputation: 0
Hi,
i just did that 2 days ago, this post fixed me up. just use the demo they give and change what you need...
good luck.
http://httpd.apache.org/docs/1.3/vhosts/name-based.html
 
Old 11-25-2008, 08:53 AM   #5
Goce
LQ Newbie
 
Registered: Nov 2008
Location: Eugene, OR
Distribution: Ubuntu Linux 8.04
Posts: 7

Original Poster
Rep: Reputation: 0
Cool

Ok, nevermind.. I think I understand it now.. Just gunna be tough to get the DNS entries cause it says for outside access the DNS must also be set.. But I think you gave me enough info to get it! Thank you very much!!
 
Old 11-25-2008, 08:54 AM   #6
Goce
LQ Newbie
 
Registered: Nov 2008
Location: Eugene, OR
Distribution: Ubuntu Linux 8.04
Posts: 7

Original Poster
Rep: Reputation: 0
Wink

Thank you very much! I appreciate all the help you have all been.
 
  


Reply



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
DNS (Non authoritive Issue) - Websites load very slowly jwals Linux - Newbie 7 09-03-2008 02:39 PM
Reverse DNS lookup and get the hosted websites vargadanis Linux - Server 12 02-22-2007 11:06 AM
Bind9 to serve my MX and A DNS records? mikecrowe Linux - Networking 3 12-21-2006 11:11 AM
DNS - serving sites locally m0untaind0g Linux - Networking 2 02-19-2004 07:42 AM
Can my DNS box serve my site through cash to save bandwidth? 360 Linux - Networking 1 06-04-2002 10:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:05 PM.

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