New VirtualHost takes control of DirectoryRoot
I have a single host on my newly setup linode.
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
# 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
4 Replies
Why is it falling back to the default? Double-check your spelling on the ServerName line for pellacrosscountry.com… doh!
As penance, you owe me a dutch letter.
@runrobrun:
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