/etc/apache2/conf.d/virtul.conf
:
NameVirtualHost *
In the first file of sites-enabled/website1.org
you'll see a group such as:
<VirtualHost *>
ServerName website1.org
</VirtualHost>
And the same for website2.org
The domain (and subdomains) located in website1.org work exactly how they should. However, nothing works for website2.org. When visiting website2.org in a browser I get a 500 Internal Server Error
Two notes:
1) When running # /etc/init.d/apache2 restart
I get:
* Restarting web server apache2 [Tue Jul 24 09:31:59 2012] [warn] NameVirtualHost 72.10.54.89:80 has no VirtualHosts
... waiting [Tue Jul 24 09:32:00 2012] [warn] NameVirtualHost 1.23.456.769:80 has no VirtualHosts
2) website2.org has an ssl cert and that ssl VH is set up as sites-enabled/website2.org-ssl
FYI yes I ran a2ensite
for every domain, followed by an apache reload
and after all were setup I did an apache restart
.
What can I do to get my second website live? I'm not sure what to check next.. Thx for help.
** edit @RedFoxy **
* Restarting web server apache2 [Tue Jul 24 10:56:57 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:57 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:57 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:57 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:57 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:57 2012] [warn] NameVirtualHost 72.10.54.89:80 has no VirtualHosts
[Tue Jul 24 10:56:57 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
... waiting [Tue Jul 24 10:56:58 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:58 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:58 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:58 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:58 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:58 2012] [warn] NameVirtualHost 72.10.54.89:80 has no VirtualHosts
[Tue Jul 24 10:56:58 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
It's simple, just you must specify the port as:
and
Remember to change :80 with the web port that you need