Home >Operation and Maintenance >Nginx >What are the common operations of Nginx?

What are the common operations of Nginx?

WBOY
WBOYforward
2023-05-14 08:04:05669browse

What are the common operations of Nginx?

Check nginx.conf for syntax errors

[root@localhost conf]# /usr/local/nginx/sbin/nginx  -tnginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

Update the configuration file to make it effective

[root@localhost conf]# /usr/local/nginx/sbin/nginx  -s  reload

Verify whether nginx is configured incorrectly

[root@localhost sbin]# /usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.confnginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

Start nginx

[root@localhost sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

View nginx process

[root@localhost sbin]# ps -ef|grep nginxroot       4870      1  0 22:35 ?        00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nginx      4871   4870  0 22:35 ?        00:00:00 nginx: worker process
root       4873   2389  0 22:35 pts/0    00:00:00 grep --color=auto nginxs

The above is the detailed content of What are the common operations of Nginx?. For more information, please follow other related articles on the PHP Chinese website!

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