NGINX HTTP Server
Installation
sudo apt install nginxRun the service
sudo nginxor
sudo systemctl start nginx.service2.1.2. Configuration
Create the web root folder
/var/www/domain-one.com/public_htmlCreate the file
/etc/nginx/sites-available/domain.xxx.conf:
server {
listen 80;
listen [::]:80;
server_name domain.xxx www.domain.xxx;
root /var/www/domain-one.com/public_html;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
}Validate the configuration file has no syntax errors:
HTTPS
Generation of Certificate from Let’s Encrypt
Install certbot
Run certbot
Configuration of NGINX server
Set the following content for
/etc/nginx/sites-available/domain.xxx.conf:
Last updated