littlebizzy / slickstack

Lightning-fast WordPress on Nginx
https://slickstack.io
GNU General Public License v3.0
629 stars 112 forks source link

Update ss-encrypt-certbot.txt #128

Closed gingibash closed 2 years ago

gingibash commented 2 years ago

bug: certbot issued cert with www and www

jessuppi commented 2 years ago

Thanks @gingibash

However this was done on purpose so that Nginx can 301 redirect the www version to non-www version. If there is no SSL certificate for the www version than 301 redirect will fail (in Nginx and/or in Cloudflare Page Rules).

gingibash commented 2 years ago

But you are including www, twice

-d www.${SITE_DOMAIN_EXCLUDING_WWW} and -d ${SITE_DOMAIN_INCLUDING_WWW}

this way the certificate is invalid since it is not issued for tld. At least on my side, tried it on 4 servers. If you remove www in front of SITE_DOMAIN_EXCLUDING_WWW it is valid for both tld and www subdomain.

jessuppi commented 2 years ago

Okay I got it now, thanks!