Question

Error with Lets Encrypt when setting up multiple subdomains on Apache

andrew@defiant:/etc/apache2/sites-enabled$ sudo certbot --apache Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?


1: 123.ca 2: fresh.123.ca 3: gene.123.ca 4: glpi.123.ca 5: spectre.123.ca 6: www.123.ca


Select the appropriate numbers separated by commas and/or spaces, or leave input blank to select all options shown (Enter ‘c’ to cancel): 2,3,4,5,6


You have an existing certificate that contains a portion of the domains you requested (ref: /etc/letsencrypt/renewal/gene.123.ca.conf)

It contains these names: gene.123.ca, spectre.123.ca

You requested these names for the new certificate: fresh.123.ca, gene.123.ca, glpi.123.ca, spectre.123.ca, www.123.ca.

Do you want to expand and replace this existing certificate with the new certificate?


(E)xpand/©ancel: e Renewing an existing certificate Deploying Certificate to VirtualHost /etc/apache2/sites-enabled/fresh-le-ssl.conf Deploying Certificate to VirtualHost /etc/apache2/sites-enabled/gene-le-ssl.conf Deploying Certificate to VirtualHost /etc/apache2/sites-enabled/glpi-le-ssl.conf Deploying Certificate to VirtualHost /etc/apache2/sites-enabled/spectre-le-ssl.conf Deploying Certificate to VirtualHost /etc/apache2/sites-enabled/123-le-ssl.conf

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.


1: No redirect - Make no further changes to the webserver configuration. 2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for new sites, or if you’re confident your site works on HTTPS. You can undo this change by editing your web server’s configuration.


Select the appropriate number [1-2] then [enter] (press ‘c’ to cancel): 2 Failed redirect for 123.ca Unable to set enhancement redirect for 123.ca Unable to find corresponding HTTP vhost; Unable to create one as intended addresses conflict; Current configuration does not support automated redirection

Does this mean that I somehow need to set up a vhost for my actual domain? I have tried setting up server aliases but this does not seem to resolve the issue.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @andrewSnorkler,

Yes, you’ll need to setup a vhost for your domains otherwise Let’s Encrypt will not be able to find and install the certificates and then do the redirect.

It would be best to have each domain as a separate virtual host.

Regards, KFSys