Since I added IPs to my server, I have a lot of issues when starting apache
.
I always have these errors below:
[warn] NameVirtualHost *:443 has no VirtualHosts
[warn] NameVirtualHost *:80 has no VirtualHosts
Sometimes it prevents apache
to start, and sometimes not
My conf:
OS : CentOS 6.6
Apache : 2.2.15
My httpd.conf
:
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
ServerName www.domain.com
....
</VirtualHost>
#more than 500 others <VirtualHost *:80> for each domain
Best Answer
Your config can work for some times, but mostly it unworkable. Working config look like:
Or made separate file for vhosts.conf (In centos your path for file will be /etc/httpd/conf.d/vhosts.conf). If you need separate tls certificate for every virtual host you need some additional changes.