I can't stop the nginx server on windows. I've tried: nginx -s stop
, taskkill /if nginx.exe
, and end process via task manager, yet it's still running!
Check Nginx is running or not We can verify that the Nginx is installed and running by using the following command: $ ps -ef | grep nginx.
The easiest, straightforward, and reliable way to restart the Nginx server or service is using the systemctl restart command.
The primary Nginx configuration file is /etc/nginx/nginx. conf . To inspect the configuration, use the cat /etc/nginx/nginx. conf command, and search for the server directive.
Use @taskkill /f /im nginx.exe
for this task.
You can stop using quit
nginx.exe -s quit
One can toggle Nginx start stop in Windows using 2 command prompts. One for Nginx start and other for Nginx Stop.
If you stop Nginx from one command prompt then the Nginx process which was started from other prompt will automatically stop, Otherwise if you try to stop the Nginx process from where it started using ctrl+c then it will not stop even tough you close the command prompt, Unless you kill the nginx processes from TaskManager.
This worked for me
wmic process where name='nginx.exe' delete
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With