61 views
asked in Technology by

How To Secure Apache with Let's Encrypt on Ubuntu 22.04

1 Answer

answered by

inchirags@gmail.com  Chirag's Technology Tutorial https://www.chirags.in

*********************************************************************************************

How To Secure Apache with Let's Encrypt on Ubuntu 22.04

***********************************************************************************************

First, update the local package index:

    $ sudo apt update

Step 1 — Installing Certbot

    $ sudo apt install certbot python3-certbot-apache

Step 2 — Checking your Apache Virtual Host Configuration

    $ sudo nano /etc/apache2/sites-available/your_domain.conf
    $ sudo apache2ctl configtest
    $ sudo ufw status

To allow for HTTPS traffic, allow the “Apache Full” profile:

    $ sudo ufw allow 'Apache Full'

Then delete the redundant “Apache” profile:

    $ sudo ufw delete allow 'Apache'

Your status will display as the following:

    $ sudo ufw status

Step 4 — Obtaining an SSL Certificate

    $ sudo certbot --apache

This script will prompt you to answer a series of questions in order to configure your SSL certificate.

Certificate is saved at: /etc/letsencrypt/live/advanceheartcare.in/fullchain.pem

Key is saved at: /etc/letsencrypt/live/advanceheartcare.in/privkey.pem

Step 5 — Verifying Certbot Auto-Renewal

Let’s Encrypt’s certificates are only valid for ninety days. This is to encourage users to automate their certificate renewal process, as well as to ensure that misused certificates or stolen keys will expire sooner rather than later.

To check the status of this service and make sure it’s active, run the following:

    $ sudo systemctl status certbot.timer

To test the renewal process, you can do a dry run with certbot:

    $ sudo certbot renew --dry-run

Note : Flow the Process shown in video.

Subscribe and like for more videos:

https://www.youtube.com/@chiragstutorial

Don't forget to, Follow, Like, Share &, Comment

Thanks & Regards,

Chitt Ranjan Mahto "Chirag"

_____________________________________________________________________

Note: All scripts used in this demo will be available in our website.

Link will be available in description.

Most popular tags

postgresql laravel replication ha postgresql laravel-10 mongodb ubuntu 24.04 lts mongodb database mongodb tutorial streaming-replication mysql laravel-11 database laravel postgresql backup database mysql php technlogy asp.net asp.net c# mysql master slave replication centos linux laravel sql server schedule backup autobackup postgresql django python user and admin registration user and admin login multiauth zabbix 7 how to install graylog on ubuntu 24.04 lts | step-by-step asp.net core mvc .net mvc network upload c# ssl integration sql server on ubuntu 22.04 lts mssql server ms sql server sql server user access in postgres mysql password change cent os linux laravel login register logout replica php in iis php with iis php tutorial chirags php tutorials chirags php tutorial chirags tutorial laravel 11 gaurds laravel 11 guards mongodb sharding metabase business analytics metabase ubuntu 24.04 koha 24.05 postgresql 16 to postgresql 17 postgresql migration letsencrypt mongodb crud rocky linux laravel custom captcha laravel 11 captcha laravel captcha mongo dll php.ini debian 12 nginx apache nextcloud gitea in ubuntu git gitea npm error node js mysql ndb cluster mysql cluster ssl oracle login register logout in python debian windows shell batch file bat file time stamp date time shopping cart in laravel centos rhel swap memeory rhel 5.5 access configuration in postgresql hba configuration laravel multiple database configuration state city country dropdown live photo upload webcam captcha in laravel
...