Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Sep 23, 2014 9:17 pm 
Offline
Newbie

Joined: Tue Sep 23, 2014 2:16 pm
Posts: 2
OK. I have been banging my head. This isn't the first time I have configured VirtualHosts but I have never come across this problem.

I have a single host on my newly setup linode.
Code:
pellacrosscountry.com
# domain: pellacrosscountry.com
# public: /var/www/pellacrosscountry.com/public_html/

<VirtualHost *:80>
  # Admin email, Server Name (domain name), and any aliases
  ServerAdmin runrobrun@gmail.com
  ServerName pellcrosscountry.com
  ServerAlias www.pellacrosscountry.com
  ServerAlias pelladutchxc.com
  ServerAlias www.pelladutchxc.com

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /var/www/pellacrosscountry.com/public_html/

  # Log file locations
  LogLevel warn
  ErrorLog  /var/www/pellacrosscountry.com/log/error.log
  CustomLog /var/www/pellacrosscountry.com/log/access.log combined
</VirtualHost>

Works find and dandy.
I set up and enabled a second virtual host gatewaynazarene.org
Code:
# domain: gatewaynazarene.org
# public: /var/www/gatewaynazarene.org/public_html/

<VirtualHost *:80>
  # Admin email, Server Name (domain name), and any aliases
  ServerAdmin runrobrun@gmail.com
  ServerName  gatewaynazarene.org
  ServerAlias www.gatewaynazarene.org

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /var/www/gatewaynazarene.org/public_html/
  # Log file locations
  LogLevel warn
  ErrorLog  /var/www/gatewaynazarene.org/log/error.log
  CustomLog /var/www/gatewaynazarene.org/log/access.log combined
</VirtualHost>

As soon as I make this change and enable the site then restart apache the original domain pellacrosscountry.com pulls up the html file stored in the gatewaynazarene.org DocumentRoot? I have dug through configurations in the apache2.conf that I can think of.

Any ideas? Interestingly enough if I enable a third site then pellacrosscountry.com points to that one. Probably something really stupid but I can't seem to get it figured out.

Rob


Top
   
PostPosted: Tue Sep 23, 2014 10:48 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Why that particular site? The config files are loaded in alphabetical order by filename, and I bet gatewaynazarene.org is sorting before pellacrosscountry.com, so that's what gets loaded by default.

Why is it falling back to the default? Double-check your spelling on the ServerName line for pellacrosscountry.com... doh!

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
PostPosted: Wed Sep 24, 2014 8:23 am 
Offline
Newbie

Joined: Tue Sep 23, 2014 2:16 pm
Posts: 2
Well...this is embarrassing. I knew it was something stupid like that I just couldn't see it. Thanks for being my second pair of eyes, hoopycat! I will try not to pollute this space with such silly issues.


Top
   
PostPosted: Wed Sep 24, 2014 8:17 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Don't sweat it!! It was simple, and now you probably know why it didn't manifest itself before. Best part is that you posted enough information that I could actually spot the problem. :-)

As penance, you owe me a dutch letter.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
PostPosted: Sun Sep 28, 2014 1:03 am 
Offline
Senior Newbie

Joined: Wed Sep 03, 2014 2:00 pm
Posts: 13
runrobrun wrote:
Well...this is embarrassing. I knew it was something stupid like that I just couldn't see it. Thanks for being my second pair of eyes, hoopycat! I will try not to pollute this space with such silly issues.


I had this happen to me last week :) drove me nuts until I went over the virtualhost config real well and saw that I was missing a letter, doh!


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


Who is online

Users browsing this forum: No registered users and 3 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