Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Dec 24, 2004 1:43 pm 
Offline
Senior Newbie
User avatar

Joined: Wed Dec 15, 2004 3:44 pm
Posts: 12
I have my Linode set up as hostname dotmil.org with several virtual servers for other domains. Before I added the virtual servers dotmil.org showed the /var/www directory for it's root, but now when I go to dotmil.org, it maps to the first virtual server's home/public_html instead. The only things that were changed on the httpd.conf was adding the virtual servers, any ideas on where to begin to fix this? Google, et. al. weren't much help.

My httpd.conf can be seen at this link. This is on a Debian Sarge installation too FWIW.


Top
   
 Post subject:
PostPosted: Fri Dec 24, 2004 1:57 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
I've faced this before and know of one way to fix it. There might be a more "correct" way, but:

Since you're doing Name Based virtual hosts on the primary/single IP, you need to add dotmill as another <VirtualHost>, with a proper "ServerName" option.

-Chris


Top
   
 Post subject:
PostPosted: Fri Dec 24, 2004 2:35 pm 
Offline
Senior Newbie
User avatar

Joined: Wed Dec 15, 2004 3:44 pm
Posts: 12
Thanks, that fixed it.

Just curious, I do have a second IP for my Linode (for DNS purposes), could I configure virtual servers on that IP as well? I'm assuming yes, but it would probably be with little or no purpose unless for SSL or something like that?


Top
   
 Post subject:
PostPosted: Fri Dec 24, 2004 2:38 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
dotmil wrote:
curious, I do have a second IP for my Linode (for DNS purposes), could I configure virtual servers on that IP as well? I'm assuming yes, but it would probably be with little or no purpose unless for SSL or something like that?

You are exactly correct. SSL certs are the only thing that requires an additional IP for hosting...

-Chris


Top
   
 Post subject:
PostPosted: Fri Dec 24, 2004 7:45 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
caker wrote:
I've faced this before and know of one way to fix it. There might be a more "correct" way, but:

caker's way is the correct way.

apache docs wrote:
If you are adding virtual hosts to an existing web server, you must also create a <VirtualHost> block for the existing host. The ServerName and DocumentRoot included in this virtual host should be the same as the global ServerName and DocumentRoot. List this virtual host first in the configuration file so that it will act as the default host.

Virtual host documentation

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Sat Dec 25, 2004 12:58 pm 
Offline
Senior Newbie
User avatar

Joined: Wed Dec 15, 2004 3:44 pm
Posts: 12
Thanks pclissolid; time to RTFM.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group