This guide will step you through how to install Nginx on Debian 10 Buster. Nginx is an opensource web server, reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, load balancer and an HTTP cache.
Install Nginx on Debian 10 Buster
Nginx is available on the default Debian 10 Buster repos and can be installed using the APT package manager.
Run system update
To resynchronize your system packages to their latest versions, run the commands below
apt update
apt upgradeInstall Nginx on Debian 10 Buster
apt install nginxRunning Nginx
Upon installation, Nginx is started and enabled to run on system boot.
systemctl status nginx● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-07-18 20:48:37 EAT; 17s ago
Docs: man:nginx(8)
Main PID: 1497 (nginx)
Tasks: 2 (limit: 1150)
Memory: 3.1M
CGroup: /system.slice/nginx.service
├─1497 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─1498 nginx: worker processsystemctl is-enabled nginx
enabledTo stop or restart Nginx;
systemctl stop nginxsystemctl restart nginxTo reload Nginx;
systemctl reload nginxTo verify Nginx for any configuration errors;
nginx -tAllow Nginx on Firewall
If UFW is running, allow access to Nginx.
ufw allow 'Nginx Full'The above command open ports 80 (HTTP) and 443 (HTTPS) on firewall. If you need to open just port 80 (allow HTTP traffic) or port 443 (allow HTTPS traffic), you can run either of the commands below respectively.
ufw allow 'Nginx HTTP'ufw allow 'Nginx HTTPS'Accessing Nginx
To verify that Nginx is ready to server your web pages, navigate to the browser and enter the server IP address, http://<server-IP>.
If all is well, you should land on Nginx welcome page.

Nginx is installed successfully on Debian 10 Buster
You can also check our other articles using the below links;
Install phpMyAdmin on Debian 10 Buster

