Why is apache serving the default?

Posted by Matt on Server Fault See other posts from Server Fault or by Matt
Published on 2011-01-26T16:10:45Z Indexed on 2011/01/31 15:27 UTC
Read the original article Hit count: 399

Filed under:
|
|
|
|

I keep adding more vhosts and enabling them but all the sites always do to the default vhost in sites-available

here is what the default kind of looks like with me only changing the ip for security reasons

 <VirtualHost 167.889.88.88:80>
     ServerAdmin webmaster@localhost

     DocumentRoot /var/www
     <Directory />
             Options FollowSymLinks
             AllowOverride None
     </Directory>
     <Directory /var/www/>
             Options Indexes FollowSymLinks MultiViews
             AllowOverride None
             Order allow,deny
             allow from all
     </Directory>

     ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
     <Directory "/usr/lib/cgi-bin">
             AllowOverride None
             Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
             Order allow,deny
             Allow from all
     </Directory>

     ErrorLog /var/log/apache2/error.log

     # Possible values include: debug, info, notice, warn, error, crit,
     # alert, emerg.
     LogLevel warn

     CustomLog /var/log/apache2/access.log combined

 Alias /doc/ "/usr/share/doc/"
 <Directory "/usr/share/doc/">
     Options Indexes MultiViews FollowSymLinks
     AllowOverride None
     Order deny,allow
     Deny from all
     Allow from 127.0.0.0/255.0.0.0 ::1/128
 </Directory>

 </VirtualHost>

and here is my other which i named some-site.net

 <VirtualHost *:80>
     ServerName some-site.net
     DocumentRoot "/var/www/vhosts/somesite.com/http/"

     <Directory "/var/www/vhosts/somesite.com/http/">
             AllowOverride all
             Options -MultiViews
     </Directory>
 </VirtualHost>

and it turned on my this command

sudo a2ensite some-site.net
 Enabling site some-site.net.
 Run '/etc/init.d/apache2 reload' to activate new configuration!

then i reloaded

/etc/init.d/apache2 reload
* Reloading web server config apache2
 ...done.

but when i visit the url some-site.net i get the index page that is for the default vhost...what am i doing wrong

© Server Fault or respective owner

Related posts about apache

Related posts about ubuntu