How to change nginx configuration file

步履不停
Release: 2019-06-21 11:04:25
Original
6932 people have browsed it

How to change nginx configuration file

Enter nginx.conf:

vi /usr/local/nginx/conf/nginx.conf
Copy after login

Modify the configuration file:

Exit without saving ( No forced exit):

esc -->  :q! --> 回车(强制退出)
esc --> :q --> 回车 (不强制退出)
Copy after login

Save and exit:

esc --> :wq --> 回车
Copy after login

Test whether the modification is successful:

/usr/local/nginx/sbin/nginx -t
Copy after login

Reload:

/usr/local/nginx/sbin/nginx -s reload
Copy after login

For more Nginx related technical articles, please visit the Nginx Tutorial column to learn!

The above is the detailed content of How to change nginx configuration file. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
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!