DNS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationDNS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Dell PowerEdge Servers
  #1  
Old April 25th, 2008, 05:09 PM
vital101 vital101 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 14 vital101 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 52 m 4 sec
Reputation Power: 0
Hosting two sites on one ip Adress

Let's say that I own two domain names: myblog.com and myforum.com.

The blog and forum are both hosted on the same box, just under different directories. Therefore they have the same IP address.

When I set up the dns entries for myblog.com and myforum.com, i need them to point to the ip address AND the directory, however GoDaddy's dns tool says that's not allowed.

Is this the wrong way to do this? Is there a better way?

Thanks,
vital101

Reply With Quote
  #2  
Old April 25th, 2008, 05:42 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information.
 
Join Date: Jan 2005
Location: Florida
Posts: 2,596 hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)  Folding Points: 27176 Folding Title: Starter FolderFolding Points: 27176 Folding Title: Starter Folder
Time spent in forums: 1 Month 1 Week 1 Day 5 h 37 m 8 sec
Reputation Power: 1166
Quote:
Originally Posted by vital101
Let's say that I own two domain names: myblog.com and myforum.com.

The blog and forum are both hosted on the same box, just under different directories. Therefore they have the same IP address.

When I set up the dns entries for myblog.com and myforum.com, i need them to point to the ip address AND the directory, however GoDaddy's dns tool says that's not allowed.

Is this the wrong way to do this? Is there a better way?

Thanks,
vital101


Welcome to Dev Shed.

DNS will be used to point an IP address to a domain (or in this case, domains). Then since the domains will be on the same box, you can setup your webserver for virtual hosts. The Virtual Hosts are what will set the particular directory for each domain.

Just a few questions:
What web server will you be using?
What OS are you running?
You're using GoDaddy's DNS config tool... do you have a dedicated server with them, or are you using their DNS manager to point to your own box?

Reply With Quote
  #3  
Old April 26th, 2008, 04:07 AM
micinter micinter is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Posts: 6 micinter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 10 m 43 sec
Reputation Power: 0
I have been hosting multiple sites on the same IP for ages. In the DNS all the A records point to the IP address of the webserver (which in this case will be the same IP for both domains). You can then differentiate the two websites by using Host Header Names which you configure in the webserver. The way i understand it is the webserver checks what domain name the client actually typed in and then matches it with a host header name you have assigned a website.

I can only describe it for IIS on windows as thats all i've ever run. You open the properties of the website in IIS, on the website tag select the IP that the website will use (this can be left as unassigned if the server only has 1 IP and there are no other webservers on your network). Click the advanced button next to it. A window opens and you will see in the top box is a record that relates to the IP address of the webserver. Select it and click edit and there you can enter the Host Header Name. This is just the web address without http://

I use IIS on Windows server and it works really well. I understand it has a few drawbacks, especially concerning SSL (i think you can only have 1 website using SSL per IP), but otherwise i haven't come across any problems. I'm not 100% sure if it can be done in the same way using software other than IIS but i think it can.

Hope that helps in some way,

Michael

Reply With Quote
  #4  
Old April 26th, 2008, 10:20 AM
vital101 vital101 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 14 vital101 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 52 m 4 sec
Reputation Power: 0
Thanks for the information. I'm new to using DNS. For your information, I'm using Apache2, running on an Ubuntu Dapper box. I'm using the DNS to point to my own box, as I'm fairly cheap and don't want to pay for a real host. Now that I know what I'm looking for, I'll see what I can find on virtual hosts. However, any more help on configuring Apache to use virtual hosts would be greatly appreciated.

Reply With Quote
  #5  
Old April 26th, 2008, 10:31 AM
vital101 vital101 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 14 vital101 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 52 m 4 sec
Reputation Power: 0
Solved!

Once again, I can't thank everyone enough for the help. Here's my solution to the problem (for the record).

1) Go to: /etc/apache2/httpd.conf
2) Add something like this:
Code:
 
<VirtualHost *>
    ServerName www.mydomainname.com
    DocumentRoot /var/www/folder
    </VirtualHost>

    <VirtualHost *>
    ServerName www.otherdomain.com
    DocumentRoot /var/www/otherfolder
</VirtualHost>

3) Restart Apache.

This worked like a charm.

/vital101

Reply With Quote
  #6  
Old April 26th, 2008, 10:44 AM
vital101 vital101 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 14 vital101 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 52 m 4 sec
Reputation Power: 0
Not Solved....

Okay, so I have a different issue now but it's still related. I set up my virtual hosts file just like above, however now if I enter my server's ip address (local or outward facing), or either of the domains, they both point to the first entry in the virtual hosts file.

Any ideas?

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationDNS > Hosting two sites on one ip Adress


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway