Web Hosting
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb HostingWeb Hosting

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:
  #1  
Old July 17th, 2001, 12:12 PM
edwards151 edwards151 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 26 edwards151 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question multiple domains to one IP

Quick question. I have multiple domains that I want directed to the same site. For example, mydomain.com is the main site. I also own mydomain.net and mydomain.org, and I want these two domains to point to mydomain.com.

Other than setting up the DNS so that all domains point to the same IP, what do I need to do to the Apache conf?

As it is right now, the DNS has been changed and nothing has been done to Apache. Sure enough, mydomain.net points where it should (to the mydomain.com site), but the URL in the location bar remains mydomain.net. Ideally, I would like the URL to change from mydomain.net to mydomain.com as soon as the browser opens the homepage.

Hope this isn't too confusing.

Thanks for any help!

Jon

Reply With Quote
  #2  
Old July 17th, 2001, 06:11 PM
Boron Boron is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Montreal
Posts: 19 Boron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Boron
IP Aliasing?

a Friend tells me you need to get IP Aliasing Setup, I have no idea if this is right but it would give you something to look at.

Reply With Quote
  #3  
Old July 22nd, 2001, 01:29 PM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,632 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 12 m 33 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
IP aliasing is kind of barking up the wrong tree. You'd use IP aliasing if you wanted to have more than one IP go to the same machine/NIC, I believe.

Anyway, what you need to do in httpd.conf is set up a <Virtual Host> container for each domain you're hosting on the same IP.

Read the apache docs at www.apache.org.

You'll want to look into "name based virtual hosting."


It'll kind of look like this (off the top of my head):

Code:
NameVirtualHost *

<VirtualHost *>
ServerName www.mydomain.com
ServerAlias *.mydomain.com www.mydomain.com
DocumentRoot /home/www/mydomain.com/
#Whatever else you want to define-custom access logs,
#cgi-bin alias, etc.
</VirtualHost>

<VirtualHost *>
ServerName www.myotherdomain.com
ServerAlias *.myotherdomain.com www.myotherdomain.com
DocumentRoot /home/www/myotherdomain.com/
#Whatever else you want to define-custom access logs,
#cgi-bin alias, etc.
</VirtualHost>


Good luck!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb HostingWeb Hosting > multiple domains to one IP


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


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





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