Second virtual host on Apache redirects to root

Posted by Slytherin on Server Fault See other posts from Server Fault or by Slytherin
Published on 2014-06-06T07:35:24Z Indexed on 2014/06/06 9:27 UTC
Read the original article Hit count: 205

Filed under:
|
|

I tried to setup my second virtual host , but I'm getting the default /var/www/index.html ( the one that says "It works!" ) I followed the same procedure as the first time, but this time it didn't work

my configuration looks like this

<VirtualHost *:80>  
ServerName messup
ServerAlias messup.loc
ServerAdmin webmaster@localhost
DocumentRoot /var/www/messup
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

my hosts configuration is the following

127.0.0.1   localhost
127.0.1.1   SlytherinPC
127.0.0.1   AFS.loc
127.0.0.1   messup.loc

After this , my apache wouldn't restart without any message , only saying [fail] , but stop and start worked.

What am I missing ?

© Server Fault or respective owner

Related posts about apache-2.2

Related posts about virtualhost