[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


Tags:

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

  • How high can a Xeon CPU get?
  • bash fix PATH environment variable "command not found" solution
  • Ubuntu Linux Mint Debian Redhat Youtube Cannot Play HD or 4K videos, dropped frames or high CPU usage with Nvidia or AMD Driver
  • hostapd example configuration for high speed AC on 5GHz using WPA2
  • hostapd how to enable and use WPS to connect wireless devices like printers
  • Dell Server Workstation iDRAC Dead after Firmware Update Solution R720, R320, R730
  • Cloned VM/Server/Computer in Linux won't boot and goes to initramfs busybox Solution
  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint