I have an OpenVZ VPS running Ubuntu 10.04, and a standard install of Apache2, PHP, the usual. I am trying to set up multiple hostname-based VHosts to allow all of my users to have access to some webspace, but when I define more than 1 VirtualHost entry in my httpd.conf, Apache will not start. Using 'service apache2 start' reports a failure, and 'apache2ctl start' runs fine, but apache isn't running after it finishes.
At the moment, I'm only trying to get 2 VHosts working, a real domain name, and a similar No-IP subdomain. Here is my httpd.conf:
NameVirtualHost *:80
Listen 80
<VirtualHost *:80>
ServerName domainname.com
ServerAlias *.domainname.com
DocumentRoot /home/user1/www-pub
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog /home/user1/logs/access.log common
ErrorLog /home/user1/logs/error.log
</VirtualHost>
<VirtualHost domain.servegame.com:80>
ServerName domain.servegame.com
DocumentRoot /home/user2/www-pub
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog /home/user2/logs/access.log common
ErrorLog /home/user2/logs/error.log
</VirtualHost>
Am I missing something here? I've looked in the documentation, and as far as I can tell, everything should be working fine.