NGINX problem with hostname SSL

Started by pelthogr, May 03, 2019, 08:02:58 PM

Previous topic - Next topic

pelthogr

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?

pelthogr

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

mnemotechnikon