Home  >  Article  >  Operation and Maintenance  >  How to restart nginx server

How to restart nginx server

(*-*)浩
(*-*)浩Original
2019-11-02 09:18:2916014browse

How to restart nginx server

Restart

1. Verify that the nginx configuration file is correct (Recommended learning: nginx tutorial

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

See the following display nginx.conf syntax is ok

nginx.conf test is successful

Instructions for configuration The file is correct!

How to restart nginx server

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

How to restart nginx server

2. Restart the Nginx service

Method 1: Enter the nginx executable directory sbin and enter the command ./nginx -s reload

How to restart nginx server

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 server

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