What is nginx
Nginx is a high-performance, open-source web server and reverse proxy. It is a viable alternative to apache web server.
Installing nginx in Ubuntu 24.04 LTS
First issue the following command:
$ sudo apt update
then install the package by running:
$ sudo apt install nginx -y
Now check the status of nginx service by entering the following command:
$ sudo systemctl status nginx
If the response is the following:
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled)
Active: active (running) since Sun 2026-05-24 02:51:30 CEST; 3min 38s ago
...
then it is running ok.
Install Certbot for Nginx
Certbot is a package for installing and automating SSL/TLS certificates for websites.
To install the package issue the following command:
$ sudo apt install certbot python3-certbot-nginx -y
To obtain SSL certificat for your domain run the following command:
$ sudo certbot --nginx -d el-jaouari.cloud
After answering some questions the certificate is issued for your domain and renewed periodically by a systemd timer.