[warn] VirtualHost overlaps with VirtualHost, the first has precedence, perhaps you need a NameVirtualHost directive

[root@thetor2017 conf]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: WARNING: MaxClients of 3000 exceeds ServerLimit value of 300 servers,
lowering MaxClients to 300. To increase, please see the ServerLimit
Warning: DocumentRoot [/www/vhosts/seconddomain.com/httpdocs] does not exist
Warning: DocumentRoot [/www/vhosts/seconddomain.com/httpdocs] does not exist
httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName
[Sat Jul 21 19:17:31 2018] [warn] VirtualHost overlaps with VirtualHost, the first has precedence, perhaps you need a NameVirtualHost directive
[Sat Jul 21 19:17:31 2018] [warn] NameVirtualHost *:9343 has no VirtualHosts
[ OK ]

The Solution

Edit the vhosts that are having the trouble they probably have a hardcoded IP.

Change it like so:





[root@thetor2017 conf]# grep *


apache shared ssl returns wrong certificate vhost
I believe it has to do with the IP they are hitting:

[root@thetor2017 conf]# host seconddomain.com
seconddomain.com has address
seconddomain.com mail is handled by 10 mail.seconddomain.com.
[root@thetor2017 conf]# host realtechtalk.com
realtechtalk.com has address
realtechtalk.com mail is handled by 10 mail.realtechtalk.com.
[root@thetor2017 conf]# host thirddomain.com.com
thirddomain.com.com has address
thirddomain.com.com mail is handled by 10 mail.thirddomain.com.com.
[root@thetor2017 conf]# host onedomain.com
onedomain.com has address

the IPs with .55 work fine with SSL

The IPs with .102 serve domain.cn because I believe it is the first vhost and cert by alphabet on that IP

the problem is in this vhost# domain.cn.conf:
it applies to onedomain.com and thirddomain.com.com because they use the same IP as domain.cn

Normally when using .55 the first domain it would find and search is the default 00-defaultsite.conf which points to the generic cert
On top of that domain.cn.conf has the IP as the vhost "" so it is the first match for SSL.

So it defaults to the first IP and cert it finds which is domain.cn rather than sending the default generic cert


virtualhost, overlaps, precedence, namevirtualhost, directive, thetor, conf, httpd, restart, ok, maxclients, exceeds, serverlimit, servers, lowering, documentroot, www, vhosts, seconddomain, httpdocs, reliably, determine, server, domain, servername, jul, virtualhosts, edit, hardcoded, ip, grep, hostdomain, orig, apache, ssl, returns, certificate, vhost, realtechtalk, thirddomain, onedomain, ips, cn, cert, alphabet, applies, default, defaultsite, generic, quot, defaults,

Latest Articles

  • VMWare Pro Workstation Nic Disconnected and No IP Using NAT
  • Linux How To Create A RamDisk
  • mdadm force resync when resync=PENDING solution
  • Proxmox Breaks Storage/LVM Backing If Killing QEMU-IMG
  • Proxmox trying to acquire lock... TASK ERROR: can't lock file '/var/lock/qemu-server/lock-102.conf' - got timeout
  • Debian 9 SSH root password authentication failure password not working problem / solution
  • QEMU / KVM How To Manually Create Basic Virtual Machine VM
  • Linux wlan0 check all wireless clients
  • PHP Issues With Decoding Strange Smart Quotes And Non-Standard ASCII Characters
  • /etc/iproute2/rt_tables default settings file in Linux Centos 6,7 and most other NIX's
  • bind named error solutions named[2169]: error (no valid DS) resolving / error (broken trust chain) resolving / : error (no valid RRSIG) resolving 'com/DS/IN':
  • iptables how to log ALL dropped incoming packets
  • How To Edit Linux Based NM Network Manager Connection Settings Without GUI
  • Linux Disable IPV6 Centos / Debian / Mint Howto
  • Linux use growisofs to burn a larger file on a BD-R / Bluray Disc
  • Linux partprobe/partx cannot access last and 4th partition
  • DRBD Errors Caused By Physical Corruption
  • mdadm: add new device failed for /dev/sdb4 as 3: Invalid argument solution
  • Linux named / bind how to dump, view and clear the cache!
  • Centos 6 / 7 / 8 How To Change Default nameservers in /etc/resolv.conf when using DHCP / dhclient