Bobcares

Install Nginx Debian Buster: How to?

by | Aug 18, 2022

Let us take a look at how to install Nginx on Debian buster. At Bobcares our Server management services will give you a detailed overview of the entire procedure in simple steps.

Install Nginx on Debian 10 Buster

install nginx debian buster

Before proceeding, ensure that a regular, non-root user with Sudo capabilities is set up on the server.

Nginx is included in the Debian 10 Buster repositories and can be installed with the APT package manager.

Run system update

Run the scripts below to resynchronize the system packages to the most recent versions.

apt update
apt upgrade

Install Nginx on Debian 10 Buster

Type in the code given below to install the Nginx:

apt install nginx

Upon installation, Nginx is in the activation stage and ready to run on system boot. systemctl status nginx
nginx.service - A reverse proxy server and a high-performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-07-29 15:43:37 EAT; 11s ago
Docs: man:nginx(8)
Main PID: 1234 (nginx)
Tasks: 2 (limit: 1150)
Memory: 3.1M
CGroup: /system.slice/nginx.service
├─1234 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─1234 nginx: worker process
systemctl is-enabled nginx
enabled

The installation of Nginx on the Debian buster is completed. At this stage, the Nginx is in activation and ready for configurations. It is possible to stop or restart Nginx by typing in the following:

systemctl stop nginx
systemctl restart nginx

To reload the Nginx type in the following command:

systemctl reload nginx

To check Nginx for configuration issues;

nginx -t

Allow Nginx on Firewall

After the setup of Nginx on Debian buster, allow access to Nginx if UFW is running.

ufw allow 'Nginx Full'

The above command opens firewall ports 80 (HTTP) and 443 (HTTPS). Run one of the instructions below to open only port 80 (allow HTTP traffic) or port 443 (enable HTTPS traffic).

ufw allow 'Nginx HTTP'
ufw allow 'Nginx HTTPS'

Accessing Nginx

Navigate to the browser and input the server IP address, http://server-IP>, to confirm that Nginx is ready to serve your web pages. If everything is in order, the Nginx welcome page will appear. This confirms the successful installation of Nginx on Debian 10 Buster.

Nginx Process Management

After activating the Nginx on Debian 10 Buster. it is easy to configure it for process management. Use any systemctl to manage the Nginx process, just like any other system-based service. The syntax is as follows:

$ sudo systemctl nginx

Where ‘command’ is one of the following:

  1. stop -to halt the Nginx service.
  2. start – to launch the Nginx service.
  3. restart – in order to restart the Nginx service.
  4. reload – to reload the Nginx configuration file without losing connections.
  5. disable – to prevent the loading of Nginx service at boot.
  6. enable – to prevent the Nginx service from loading while booting.
  7. status -to obtain the Nginx service status.

[Need assistance with similar queries? We are here to help]

Conclusion

To conclude, it is easy to install and manage the Nginx on Debian buster. we can install and manage the Nginx following a set of simple steps.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.