Deployment of nginx under centos7.3

王林
Release: 2020-08-26 16:04:01
forward
2584 people have browsed it

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
Copy after login

2. Install the "epel-release" software package

rpm -ivh epel-release-latest-7.noarch.rpm
Copy after login

3. Install nginx with yum

yum install nginx
Copy after login

4. Start nginx

systemctl start nginx
Copy after login
Copy after login

5. Close nginx

systemctl start nginx
Copy after login
Copy after login

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

nginx -s reload
Copy after login

7. nginx configuration

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

Notes:

(1)

upstream alias{ server localhost:port; }
Copy after login

Configure service here

(2)

location / { proxy_pass http://alias; }
Copy after login

( 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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!