[warn] VirtualHost 10.2.5.101:443 overlaps with VirtualHost 10.2.5.101:443, 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
 directive.
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 10.2.5.69 for ServerName
[Sat Jul 21 19:17:31 2018] [warn] VirtualHost 10.2.5.101:443 overlaps with VirtualHost 10.2.5.101:443, 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:

<VirtualHost some-ip.here:443>

To

<VirtualHost *:443>
 

================


[root@thetor2017 conf]# grep 10.2.5.101 *
hostdomain.com.conf:
hostdomain.com.conf-orig:



========

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 10.2.5.55
seconddomain.com mail is handled by 10 mail.seconddomain.com.
[root@thetor2017 conf]# host realtechtalk.com
realtechtalk.com has address 10.2.5.55
realtechtalk.com mail is handled by 10 mail.realtechtalk.com.
[root@thetor2017 conf]# host thirddomain.com.com
thirddomain.com.com has address 10.2.5.102
thirddomain.com.com mail is handled by 10 mail.thirddomain.com.com.
[root@thetor2017 conf]# host onedomain.com
onedomain.com has address 10.2.5.102



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 10.2.5.102


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 10.2.5.55 generic cert

Latest Articles

  • AMD Set Fan Speed and Other Powerplay Memory/CPU Timings with a Linux script
  • Ethereum Mining Claymore Nanopool Error
  • genisoimage errors with long filenames and deep directory structures
  • Linux Kernel USB Export Errors
  • How to download gajim 0.16.9 XMPP/Jabber client so you can use OMEMO encryption
  • HP DL385 G7 Linux BIOS Update Flash
  • hwloc-nox set CPU affinity in Linux
  • Firefox An error occurred during a connection to some-ip-or-domain. SSL peer reports incorrect Message Authentication Code. Error code: SSL_ERROR_BAD_MAC_ALERT Solution
  • Proxmox understanding the directory structure and why an NFS datastore appears to be missing files/isos
  • pandoc convert markdown to html
  • Proxmox error uploading an iso solution
  • Cannot install moodle
  • MySQL change for Antelope format to Barracuda error solution
  • vmkping -I vmk1 10.0.2.69 PING 10.0.2.69 (10.0.2.69): 56 data bytes sendto() failed (Host is down)
  • gvfs mount in /run/user cannot be accessed or displayed wrong permissions
  • VMWare vSphere 6.7 Errors Solution 503 Service Unavailable (Failed to connect to endpoint:
  • How To Enable Nested KVM so guests can virtualize with hardware extensions
  • vi error solution E166: Can't open linked file for writing
  • Supermicro IPMI / KVM / BMC Remote Console Screen Resizing Issue - Window Cut Off Solution
  • Linux bash shell doesn't show username, hostname or current path fix solution