Nginx is a high-performance web server used by millions of websites.
Install
apt update
apt install nginx -yStart and Enable
systemctl start nginx
systemctl enable nginxVerify
Open your browser and navigate to http://YOUR_IP_ADDRESS. You should see the Nginx welcome page.
Firewall
ufw allow "Nginx Full"Key Files
- Config:
/etc/nginx/nginx.conf - Sites:
/etc/nginx/sites-available/ - Logs:
/var/log/nginx/ - Web root:
/var/www/html/
Test Configuration
nginx -t