news
Serverspace has added a new Rocky Linux OS
VB
January 30, 2023
Updated July 26, 2023

Possibilities of using Certbot for Nginx web Server

NGINX

What is certbot and why you would need to install it on nginx webserver

Certbot is software for issuing of non-paid LetsEncrypt SSL certificates. Today SSL-protection is industrial standard cause actual browsers are often marks unprotected sites as potential dangerous.



How to install Certbot

As example I will explain Certbot installation on the server under Ubuntu 20.04. So far as this software is common used, it is a part of OS repositories. And "one-step-install" is possible now. Just authorize as privileged user and run command below:

apt install -y python3-certbot-nginx

pic1

How to get the certificate

Cause the LetsEncrypt is owned by the Electronic Frontier Foundation you should a "point" your domain's A-records to your server and wait till changes is applied worldwide. To ensure just check current A-record via this command:

nslookup <your_domain_name> <any_public_DNS_server>

изображение_2023-04-27_171656998

Then ensure which service is listening web-port:

netstat -lptn | grep 80

pic3

As we see, our webserver is really nginx. So, we can issue the certificate via Certbot:

certbot --nginx -d yourdomain.tld -d www.yourdomain.tld -d anyothersubdomain.yourdomain.tld

You should see the picture like below:

pic5

To apply changes you need restart web-service:

systemctl nginx restart

pic6

Checking

To check the certificate open your website in browser, then you can see cerdificate brief or detailed info:

pic7 pic8

Conclusion

After this matherial reading you knew what is Certbot an how to issue valid certificate for your website via this software.

Vote:
5 out of 5
Аverage rating : 5
Rated by: 1
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300
We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.