NGINX is an open source web server which is used as reverse proxy, caching, load balancing, media sharing and more open source applications. It began as a web server designed to deliver maximum performance and stability. NGINX can also function as an email proxy server (IMAP, POP3, and SMTP) as well as a reverse proxy and load balancer for HTTP, TCP, and UDP servers in addition to its HTTP server capabilities.

Install Nginx

1. Please update your server/Machine first using below command:

[[email protected] ~]# yum -y update

2. After update the server,now you need to install Nginx using EPEL repository using the below command:

[[email protected] ~]# yum install epel-release
[[email protected] ~]# yum install nginx

Manage Nginx Service

After instillation of Nginx server. You need to start the service and enable auto start after boot using the below command:

[[email protected] ~]# systemctl start nginx
[[email protected] ~]# systemctl enable nginx
[[email protected] ~]# systemctl status nginx

Firewall

If you are using or enable firewall on your server. You need to open port 80 or add service for http and 443 for https and service using the below command:

[[email protected] ~]# firewall-cmd --zone=public --permanent --add-service=http
[[email protected] ~]# firewall-cmd --zone=public --permanent --add-service=https
[[email protected] ~]# firewall-cmd --reload

Verify Nginx Installed

Access your server IP or Hostname in browser url http://nginx.web4linux.com

If you will get the page after access your server IP or Hostname means you have successfully installed Nginx in your Centos-7 server.

Thankyou….