[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

  • systemd-journald high memory usage solution
  • How to Install FreePBX in Linux Debian Ubuntu Mint Guide
  • How To Install Cisco's CUCM (Cisco Unified Communication Manager) 12 Guide
  • Linux Ubuntu Redhat How To Extract Images from PDF
  • Linux and Windows Dual Boot Issue NIC Won't work After Booting Windows
  • Cisco CME How To Enable ACD hunt groups
  • How to install gns3 on Linux Ubuntu Mint
  • How to convert audio for Asterisk .wav format
  • Using Cisco CME Router with Asterisk as a dial-peer
  • Cisco CME How To Configure SIP Trunk VOIP
  • Virtualbox host Only Network Error Failed to save host network interface parameter - Cannot change gateway IP of host only network
  • Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide
  • Abusive IP ranges blacklist
  • How to Install Any OS on a Physical Drive from Windows Using VMware Workstation (Linux, Windows, BSD)
  • CDN Cloudflare how to set and preserve the real IP of the client without modifying application code on Apache
  • CentOS 7 fix Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was 14: curl#6 -
  • Ubuntu Debian How To Install Recommended Packages Automatically
  • How to set Linux Ubuntu Redhat Debian Command Line http https socks proxy for yum apt
  • How to resize a pdf without losing much quality in Linux Mint Ubuntu Debian Redhat Solution
  • qemu: could not load PC BIOS 'bios-256k.bin' solution