selloween / docker-multi-wordpress

Run multiple WordPress Docker containers with NGINX Proxy, LetsEncrypt and PHP Composer
GNU General Public License v3.0
75 stars 18 forks source link

Add subdomains to SSL certificate? #2

Closed bobey6 closed 5 years ago

bobey6 commented 5 years ago

Hello,

Is it possible to add subdomains to the SSL Certificate? I know it's possible to specify additional subdomains (like www, blog, etc) when generating letsencrypt certificates from the CLI but I wasn't sure if the docker-letsencrypt-nginx-proxy-companion container supported generating them from the composer file.

Thank you!

selloween commented 5 years ago

Yep. Subdomains work fine.

bobey6 commented 5 years ago

Do you know the syntax? I'd like to generate a valid certificate for both 'domain.tld' and 'www.domain.tld'. For now I'm just generating the certificate manually with certbot.

selloween commented 5 years ago

Sorry I checked again and I have not tried adding multiple Hosts using the Letsencrypt Proxy Companion Docker image. Regarding the NGINX Proxy, you can add multiple virtual hosts by adding them to the environment variable like this:

VIRTUAL_HOST: foo.bar.com,baz.bar.com,bar.com

You could try the same for the LETSENCRYPT_HOST environment variable.