Kiril Lukiyan
Kiril Lukiyan

Reputation: 187

How to enable let's encrypt SSL for multiple domains in a single project in VestaCP?

I have a laravel-powered website site.com with let's encrypt SSL enabled via VestaCP. Now I want to add also site.id and site.ru to be directed into same project base and have the SSL enabled on them too.

I've tried to put site.id and site.ru as aliases of site.com and without SSL it works. However if I try to disable and re-enable the let's encrypt certificate to trigger generation of certificate for all 3 domains, I get Let's encrypt 400 error.
Maybe it's somehow possible to get done via SSH commands? Or maybe I can set 3 separate www domains in vestacp and then via SSH configure nginx configuration to direct them all into one codebase folder?

My last resort would be to set 3 www domains in vesta with separate codebases and SSL certificates, but single DB. It just seems very inefficient to go this way.

Upvotes: 0

Views: 1451

Answers (1)

Alec Joy
Alec Joy

Reputation: 1989

You need to get a certificate for each unique domain that needs to be available via SSL. You don't need to have separate code bases, you just need to ask for a cert for all the sites.

certbot-auto -d site.id -d site.ru -d site.com

Upvotes: 1

Related Questions