This article covers how to install the Nginx server on a CentOS machine and add a firewall rule to allow traffic coming towards the Nginx server. Also, we've discussed how to remove Nginx from CentOS.
The Nginx is a free, open source, lightweight and high-performance web server designed for high-traffic use cases. It is also acting as a popular Web server behind the Apache Web server and Microsoft's IIS. Nginx is more resource-friendly than Apache. It can be served in front of other web servers as a reverse proxy.
How to Install Nginx Web Server ?
1. Install the nginx package with:
$ sudo dnf install nginx
2. After the installation is finished, run the following commands to enable and start the server:
$ sudo systemctl enable nginx
$ sudo systemctl start nginx
This will make Nginx start at system boot.