I have multiple domains
I have setup VPS with aapanel on CentOS 7 on a sub-domain subdomain1.example1.com (/www/wwwroot/panel_ssl_site)
when accessed via IP address on browser
http://11.22.33.44
I get "Site not found" (page created by aapanel)
If I add "s" i.e. https://11.22.33.44
I get
Your connection is not private
Attackers might be trying to steal your information from 11.22.33.44 (for example, passwords, messages, or credit cards). Learn more
NET::ERR_CERT_COMMON_NAME_INVALID
If I still ignore and continue my website subdomain2.example5.com index page opens
Browser address bar says "Not Secure"
SSL Certificate is invalid and it says Issued to subdomain2.example5.com
There are many things which I want but I will leave it currently
Right now I want that when I enter IP address in address bar how can I tell it to go to subdomain1.example2.com and show subdomain1.example2.com SSL
The reason is that when I run a CRON, I get the following error
https://subdomain1.example2.com/something.php
Resolving subdomain1.example2.com (subdomain1.example2.com)... 11.22.33.44
Connecting to subdomain1.example2.com (subdomain1.example2.com)|11.22.33.44|:443... connected.
ERROR: cannot verify subdomain1.example2.com's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’:
Issued certificate has expired.
So I believe routing (pinging, whatever) the IP address domain to subdomain1.example2.com will solve my problem