“Installing Nginx on CentOS and its Basic Configuration”

Installing Nginx on CentOS and its Basic Configuration

Environment

Server: Centos 7.0

Installation

sudo -y install nginx

Before Configuration

Make sure you have backed up the nginx.conf file.

Configuration

vi /etc/nginx/nginx.conf

Basically, you can change the port nginx listend and the root of your site.

Imgur

Result

If you have finished steps mentioned above, you may access a welcome page or your index page by your IP address or domain name.

See how to resolve your domain name