Home>Article>Operation and Maintenance> 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!