How to Install Let's Encrypt SSL in Apache on Debian 12

To install Let's Encrypt SSL on Apache in Debian 12, you can follow these steps:

Step 1 : Update your system:

Step 2 : Install the necessary packages:

Step 3 : Configure Apache to use SSL:

Step 4 : Restart Apache for the changes to take effect:

Step 5 : Create a new Apache configuration file for your domain:

Step 6 : Add the following content to the file, replacing "example.com" with your actual domain name:

Note: Adjust the DocumentRoot directive accordingly if your website files for "example.com" are stored in a different directory.

Step 7 : Enable the new virtual host:

Step 8 : Restart Apache to apply the configuration changes:

Step 9 : Obtain and install the SSL certificate:

This command will start an interactive prompt that will guide you through the SSL certificate installation process.

Step 10 : Enter your email address:

You will be prompted to enter an email address to receive renewal notifications and security alerts. Enter your email address and press Enter.

Step 11 : Agree to the terms of service and share your email address with EFF:

You will be presented with Let's Encrypt's terms of service. Read through the terms, and if you agree, press "A" and then Enter to signify your agreement.

After that, you will be asked if you would like to share your email address with EFF to receive news, updates, and other communications. Choose your preference by pressing "Y" or "N" and then Enter.

If you choose to share your email address, you will receive occasional emails from EFF. If you choose not to share your email address, no further communication will be sent.

Step 12 : Choose the domain(s) you want to secure:

Step 13 : Wait for the certificate installation to complete:

Certbot will automatically configure Apache to use the SSL certificate and reload the configuration.

Step 14 : Certbot will automatically set up a cron job to renew your SSL certificate before it expires. The renewal process typically occurs every 90 days.

Step 15 : Verify the SSL installation:

Visit your domain(s) in a web browser using https:// instead of http:// to verify that the SSL certificate is installed correctly. You should see a padlock icon indicating that the connection is secure.

Step 16 : If you want to add an additional domain and generate an SSL certificate for it. Use the following command to generate an SSL certificate for the new domain:

Congratulations! You have successfully installed Let's Encrypt SSL on Apache in Debian 12 using Certbot. Your website(s) should now be secured with SSL encryption.