One Apache VirtualHost entry overrides another?

Posted by johnlai2004 on Server Fault See other posts from Server Fault or by johnlai2004
Published on 2010-04-15T14:55:23Z Indexed on 2010/04/15 15:03 UTC
Read the original article Hit count: 315

Filed under:

I can't tell why one apache virtual host entry keeps overriding another. The following file

// filename: cbl

<VirtualHost 74.207.237.23:80>
     ServerAdmin [email protected]
     ServerName completebeautylist.com
     ServerAlias www.completebeautylist.com
     DocumentRoot /srv/www/cbl/production/public_html/
     ErrorLog /srv/www/cbl/production/logs/error.log
     CustomLog /srv/www/cbl/production/logs/access.log combined
</VirtualHost>

keeps overriding this file

// filename: theccco.org
<VirtualHost 74.207.237.23:80>
SuexecUserGroup "#1010" "#1010"
ServerName theccco.org
ServerAlias www.theccco.org
ServerAlias webmail.theccco.org
ServerAlias admin.theccco.org
DocumentRoot /home/theccco/public_html
ErrorLog /var/log/virtualmin/theccco.org_error_log
CustomLog /var/log/virtualmin/theccco.org_access_log combined
ScriptAlias /cgi-bin/ /home/theccco/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/theccco/public_html>
Options -Indexes +IncludesNOEXEC +FollowSymLinks
allow from all
AllowOverride All
</Directory>
<Directory /home/theccco/cgi-bin>
allow from all
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.theccco.org
RewriteRule ^(.*) https://theccco.org:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.theccco.org
RewriteRule ^(.*) https://theccco.org:10000/ [R]
Alias /dav /home/theccco/public_html
<Location /dav>
DAV On
AuthType Basic
AuthName theccco.org
AuthUserFile /home/theccco/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RewriteEngine off
</Location>
</VirtualHost>

I tried a2ensite, a2dissite, and reloading I get this message

 * Reloading web server config apache2                                                                      apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Thu Apr 15 10:47:36 2010] [warn] NameVirtualHost 74.207.237.23:443 has no VirtualHosts

Aside from that, I don't know what else could be wrong. Can anyone tell me what to do?

© Server Fault or respective owner

Related posts about apache2