Sunday, June 21, 2020

How to Install Nginx on Centos 7

Description: Here I have explained how to install and configure Nginx on Centos 7.

Procedure: Nginx (pronounced Engine X) is popular web server with good performance and it is alternate of Apache web server. Nginx also works as load balancer, reverse proxy and standard mail server.

Prerequisites:
  • Centos 7 server
  • Root privileges
  • Selinux setup properly
Update Repository Package List

# yum -y update

Install Extra Packages for Enterprise Linux [EPEL]

# yum install -y epel-release

Install Nginx 

# yum install -y nginx 

Start and Enable Nginx Service

# systemctl start nginx
# systemctl enable nginx

Note: If you have already install and running apache/ http, Disable it before install nginx

Enable port from firewall 

# firewall-cmd  --zone=public --permanent --add-service=http

# firewall-cmd  --zone=public --permanent --add-service=https

Verify Nginx by browse your IP Address in Browser.
http://IP_ADDRESS






1 comment: