Let’s encrypt provide valid and free ssl certificates. Let’s Encrypt has the capability to automate the SSL based virtual host deployment on an Nginx web server, and it also validates the domain name of the http based virtual host on the server if the http based virtual host is found. So then, Let’s encrypt the same HTTP virtual host and deploy a new SSL-based virtual host with the same configuration on an Nginx web server and later on we use this ssl certificate with reverse proxy, nodeJS application, HA-Proxy Load balancer etc.
In this post, We will optain and configure the Let’s Encrypt SSL certificate for any public domain with few commands.
Step 1: Do Nslookup
You must validate whether your domain points to your public IP address or not, as well as whether you are the owner of the domain, Execute the given command for the same.
If you have a sub-domain, you must also use nslookup to look up the sub-domain, like www.example.com or blog.example.com.
If you can see your public IP address, we can proceed with the next steps.
Step 2: Install Certbot
We need to update the current repository and install the certbot and python3-certbot by following the given command.
sudo apt-get update && sudo apt-get install certbot python3-certbot-nginx -y
Step 3: Obtaining an SSL Certificate
We are good to obtain the Let’s encrypt valid SSL certificate by execueting given command, You need to execute the command with your domain and sub-domain named that Public IP is pointing your server.
sudo certbot --nginx -d example.com -d www.example.com
You need to accept the agreement and do the following things, step by step:
- Email Address
- Terms and conditions
- News letter subscription
- Activate HTTPS – like https://example.com or https://www.example.com
You should receive a success message, and you should also see the certification path on your machine.
We have successfully installed Let’s encrypt SSL certificate with nginx web server on ubuntu 22.04 LTS, If you still have questions, please post them in the comments section below.
11 thoughts on “Secure Nginx with Let’s Encrypt on Ubuntu 22.04 LTS”
My partner and I absolutely love your blog and find most of your post’s to be just what I’m looking for. can you offer guest writers to write content for yourself? I wouldn’t mind creating a post or elaborating on most of the subjects you write concerning here. Again, awesome web site!
Can you write more about it? Your articles are always helpful to me. Thank you!
Great beat ! I would like to apprentice while you amend your web site, how could i subscribe for a blog site? The account helped me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear concept
Thank you for providing me with these article examples. May I ask you a question?
Your articles are very helpful to me. May I request more information?
We will publish more article soon.
May I have information on the topic of your article?
How can I find out more about it?
Hi, Our team will publish more article on it.