Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use multiple subsubdomains on one cert subdomain certificat? #613

Closed
fco4 opened this issue Jan 24, 2020 · 5 comments · Fixed by #640
Closed

How to use multiple subsubdomains on one cert subdomain certificat? #613

fco4 opened this issue Jan 24, 2020 · 5 comments · Fixed by #640
Labels
kind/question Issue that might be transferred to Discussions type/docs PR with documentation only changes

Comments

@fco4
Copy link

fco4 commented Jan 24, 2020

Hi there,
I have a subdomain like sub.example.com. I'd like to use a subdomain like https://aaa.sub.example.com with sub.example.com certificate (Issued to sub.example.com). Is it possible?

@kylelee24
Copy link

You would need to have multiple entries within the certificates SAN (subject alternative name). It looks like there may be support as the documentation says among the features that "Support creation of Multi-Domain (SAN) Certificates." however in practice and their examples don't seem to support it but rather issue separate certificates for each sub domain (E.g., https://aaa.sub.example.com, https://bbb.sub.example.com).

The documentation states to repeat step 3 for each container (with a different domain) - https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion#step-3---proxyed-containers.

@buchdag
Copy link
Member

buchdag commented Feb 1, 2020

Hi there,
I have a subdomain like sub.example.com. I'd like to use a subdomain like https://aaa.sub.example.com with sub.example.com certificate (Issued to sub.example.com). Is it possible?

Nope, certificates only covers a specific set of domains (unless they're wildcard certificate, but we don't support them yet).

If you want a certificate that covers multiple domains and/or subdomains, you 'll have to specifically configure your container that way, eg:

$ docker run --detach \
    --name your-proxyed-app
    --env "VIRTUAL_HOST=sub.example.com,aaa.sub.example.com" \
    --env "LETSENCRYPT_HOST=sub.example.com,aaa.sub.example.com" \
    nginx

This create a single SAN certificate that covers both sub.example.com and aaa.sub.example.com

however in practice and their examples don't seem to support it but rather issue separate certificates for each sub domain

We do support SAN certificate but you are right in the fact that the doc is not super clear about it. I'll try to add a basic SAN certificate example to the doc asap.

@fco4
Copy link
Author

fco4 commented Mar 21, 2020

Thank you!

@buchdag
Copy link
Member

buchdag commented Mar 21, 2020

@nocturnesound is the doc update clear to you ?

@aureliainnovatives
Copy link

hi, I am looking for wildcard certificate to be used for all of my subdomains using acme-companion with nginx reverse proxy and code-server containers. I am not able to find a good solution as if I use the subdomains as Host for Lets encrypt, it will not allow me to generate more than 50 certificates. Can you please provide me any information about how to achieve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Issue that might be transferred to Discussions type/docs PR with documentation only changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants