Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop nginx for windows?

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!

like image 979
Normajean Avatar asked Jan 06 '20 13:01

Normajean


People also ask

How do I know if nginx is running on Windows?

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.

How do I restart nginx on Windows Server?

The easiest, straightforward, and reliable way to restart the Nginx server or service is using the systemctl restart command.

Where is nginx config file windows?

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.


Video Answer


4 Answers

Use @taskkill /f /im nginx.exe for this task.

like image 68
programmer365 Avatar answered Oct 16 '22 17:10

programmer365


You can stop using quit

nginx.exe -s quit

like image 39
Kumar Avatar answered Oct 16 '22 16:10

Kumar


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.

enter image description here

like image 9
Rohit Gaikwad Avatar answered Oct 16 '22 18:10

Rohit Gaikwad


This worked for me

wmic process where name='nginx.exe' delete
like image 1
Pravin Kumar Avatar answered Oct 16 '22 18:10

Pravin Kumar