Reference: reload configuration is not valid from zero to learn how nginx-windows and restart
Because Nginx is a multi-process model, there is a main process and a number of sub-processes, only the main process responsible for managing the child process, the basic process of network events by each sub-process.
So sometimes when we go through this way to restart Nginx reload nginx -s then found to be invalid, it is because we killed a child process, then the main process will open another child process, so we need to close off Nginx of all processes (including the main process and sub-process), use the following command:
taskkill /IM nginx.exe /F
[Where / IM is used to kill off the process to specify the name of, -F, the detailed parameters can be used to introduce a mandatory kill by dos in TASKKILL /?
to view]
Then start Nginx:
start nginx.exe
that's it.