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!
Method 2: Add -t before the startup command -c
2. Restart the Nginx service
Method 1: Enter the nginx executable directory sbin and enter the command ./nginx -s reload
Method 2: Find the current nginx process number, and then enter the command: kill -HUP process number to restart the nginx service
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!