Home > Operation and Maintenance > Nginx > How to restart Nginx

How to restart Nginx

青灯夜游
Release: 2019-06-18 11:02:16
Original
107645 people have browsed it

How to restart Nginx

Steps to restart nginx:

##1. Verify that the nginx configuration file is correct

Method 1: Enter the nginx installation directory sbin, enter the command ./nginx -t

and see the following display:

nginx.conf syntax is oknginx .conf test is successful

It means the configuration file is correct!

How to restart Nginx

Method 2: Add -t before the startup command -c


How to restart Nginx

2, Restart the Nginx service

Method 1: Enter the nginx executable directory sbin and enter the command

./nginx -s reload, then

How to restart Nginx

Method 2: Find the current nginx process number, and then enter the command:

kill -HUP process number to restart the nginx service

How to restart Nginx

The above is the detailed content of How to restart Nginx. 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