I have a domain name that is linked to my ip address at home. However, I want to use the same server/ip to show more than one website.
I can't get Virtual Hosts to work though.
My conf.d/virtual.conf is:
NameVirtualHost 192.168.10.151:80
My sites-available/www.mydomain.com is:
Listen 80
<VirtualHost *>
ServerAdmin [email protected]
ServerName www.mydomain.com
ServerAlias mydomain.com
#Indexes and Directory Root
DirectoryIndex index.html index.php
DocumentRoot /media/BigDisk/www/www.mydomain.com/
# Log Files
ErrorLog /media/BigDisk/www/www.mydomain.com/logs/error.log
CustomLog /media/BigDisk/www/www.mydomain.com/logs/access.log combined
</VirtualHost>
And the site was enabled using a2ensite and apache reloaded without any warnings or errors, but when I go to www.mydomain.com
I don't get anything ("Opps! Google Chrome could not connect...").
What am I doing wrong?
Update: Restarting Apache results in this:
malfist@webhost:~$ sudo /etc/init.d/apache2 restart
[sudo] password for malfist:
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Thu Sep 01 12:16:22 2011] [warn] NameVirtualHost 192.168.10.151:80 has no VirtualHosts
[Thu Sep 01 12:16:22 2011] [warn] NameVirtualHost *:80 has no VirtualHosts
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Thu Sep 01 12:16:22 2011] [warn] NameVirtualHost 192.168.10.151:80 has no VirtualHosts
[Thu Sep 01 12:16:22 2011] [warn] NameVirtualHost *:80 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.