Be careful not to double-click nginx.exe directly. This will cause restarting and stopping nginx after modifying the configuration to be ineffective. You need to manually close all nginx processes in the task manager
In the nginx.exe directory, open the command line tool and use commands to start/stop/restart nginx
start nginx: Start nginx
nginx -s reload: Modify the configuration and reload Loading takes effect
nginx -s reopen: Reopen the log file
nginx -t -c /path/to/nginx.conf Test whether the nginx configuration file is correct
Close nginx:
nginx -s stop : Quickly stop nginx
nginx -s quit : Stop nginx completely and orderly
If you encounter an error:
bash: nginx: command not found
It is possible that you ran the windows command in the linux command line environment ,
If you allowed nginx -s reload to report errors before, try ./nginx -s reload
Or run it with the command line tool that comes with the windows system
More For Nginx related knowledge, please visit the Nginx usage tutorial column!
The above is the detailed content of How to stop nginx. For more information, please follow other related articles on the PHP Chinese website!