Home>Article>Operation and Maintenance> How to change nginx configuration file

How to change nginx configuration file

步履不停
步履不停 Original
2019-06-21 11:04:25 6913browse

How to change nginx configuration file

Enter nginx.conf:

vi /usr/local/nginx/conf/nginx.conf

Modify the configuration file:

Exit without saving ( No forced exit):

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

Save and exit:

esc --> :wq --> 回车

Test whether the modification is successful:

/usr/local/nginx/sbin/nginx -t

Reload:

/usr/local/nginx/sbin/nginx -s reload

For more Nginx related technical articles, please visit theNginx Tutorialcolumn 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!

Statement:
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