Home  >  Article  >  Operation and Maintenance  >  Deployment of nginx under centos7.3

Deployment of nginx under centos7.3

王林
王林forward
2020-08-26 16:04:012662browse

Deployment of nginx under centos7.3

Specific steps:

(Recommended tutorial: nginx tutorial)

1. Download "epel-release"

wget http://dl.Fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

2. Install the "epel-release" software package

rpm -ivh epel-release-latest-7.noarch.rpm

3. Install nginx with yum

yum install nginx

4. Start nginx

systemctl start nginx

5. Close nginx

systemctl start nginx

6. Refresh nginx configuration (no need to restart nginx)

nginx -s reload

7. nginx configuration

Configuration file path: /etc/nginx /nginx.conf

Notes:

(1)

upstream alias{
        server localhost:port;
    }

Configure service here

(2)

location / {
        proxy_pass http://alias;
    }

( 3)

(1) and (2) alias remain consistent

Deployment of nginx under centos7.3

The above is the detailed content of Deployment of nginx under centos7.3. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete