I have to create a virtual host on a server which, previously hosted a single website (domain name). Now I'm trying to add a second domain on this server (using the same nameserver). What I've done so far:
Initially there was no virtual host so I've made one for the second domain:
NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /var/www/bla ServerName www.blabla.com ServerAlias blabla.com <Directory /var/www/blabla> Order deny,allow Allow from all AllowOverride All </Directory> </VirtualHost *:80> Because nothing happend, I changed the DocumentRoot of the apache server to /var/www (initially was the root document of the first website -/var/www/html) and created a virtual host for the first domain too:
<VirtualHost *:80> DocumentRoot /var/www/html ServerName www.first.com ServerAlias first.com <Directory /var/www/html> Order deny,allow Allow from all AllowOverride All </Directory> </VirtualHost *:80> In this case, first.com is working ok, but bla.com not.
When I ping blabla.com I get the "unkown host" response. What am I doing wrong? Do I have to modify something in the DNS settings too? Thank you.