Author Topic: NGINX problem with hostname SSL  (Read 591 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
NGINX problem with hostname SSL
« on: May 03, 2019, 08:02:58 PM »
I setup SSL for the hostname of myserver.
when I visit hostname.mydomain.com I receive NET::ERR_CERT_COMMON_NAME_INVALID if I view the details of the certificate I see is certificate from mydomain.com not for hostname.mydomain.com

if I rebuild the webserver and use Apache only and visit hostname.mydomain.com everything works fine.

any suggestions why this happens?

Offline
*
Re: NGINX problem with hostname SSL
« Reply #1 on: May 03, 2019, 08:43:45 PM »
I fount solution thanks to this
https://www.mysterydata.com/how-to-enable-http-2-on-cwp7-centos-web-panel/

from here /etc/nginx/conf.d/vhosts/
I copy mydomain.com.conf mydomain.com.ssl.conf and I renamed them to hostname.mydomain.com.conf and hostname.mydomain.com.ssl.conf

I edit the renamed files
replace
the server_name to hostname.mydomain.com
the certificates to point at hostname.mydomain.com.cert / hostname.mydomain.com.key
and the paths for root folder /home/pelthoc1/public_html to /usr/local/apache/htdocs

Offline
*
Re: NGINX problem with hostname SSL
« Reply #2 on: May 14, 2019, 09:53:02 PM »
Worked for me - thank you.