What are the common operations of Nginx?

WBOY
Release: 2023-05-14 08:04:05
forward
576 people have browsed it

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

Update the configuration file to make it effective

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

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

Start nginx

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

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

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!

Related labels:
source:yisu.com
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!