0
votes

Hi i set up Let's Encrypt within Debian.

Now it works fine when i put https://example.com but it does not work fine

when i put https://www.example.com

i used the following command ./letsencrypt-auto --apache -d example.com

instead of ./letsencrypt-auto --apache -d example.com -d www.example.com

I performed the last command but the it still not working thus what can i do to

have https://www.example.com working ?

Thanks

2

2 Answers

0
votes

You have th execute the following command :

./letsencrypt-auto --apache -d example.com -d www.example.com

0
votes

I just went through the process of generating a single Let's Encrypt certificate for multiple subdomains. There were some minor challenges that I encountered and resolved. I posted a short article in the link below explaining the leasons learned I gained when installing Let's Encrypt digital certificates on my Apache web server which provides HTTP and HTTPS access to multiple subdomains.

My most important "lesson learned" is that you need to create a VirtualHost for the HTTP access AND a VirtualHost for each subdomain accessible via HTTPS. IMPORTANT: Each VirtualHost definition must be specified in a single configuration file. The Let's Encrypt certbot will not operate correctly if multiple VirtualHosts are defined within a single configuration file. I defined three (3) VirtualHosts in three (3) different configuration files below. The dummy.conf file serves no functional purpose within Apache (i.e., it will not cause an unnecessary 999 listening port), but it is absolutely necessary for digital certificates to be successfully generated by the Let's Encrypt certbot.

http configuration files

Then you can run the following command to generate the certificate:

certbot --apache -d example.com -d www.example.com

https://www.hueyise.com/index.php/letsencrypt