How to completely kill NGINX in windows?

Eventhough i killed the nginx process still it is running ..

I did the following steps 1)Finding the process PID using netstat -n -a -o | findstr "0.0.0.0:80" and killing it with taskkill /F /PID 52544 2)Even i tried giving taskkill /F /IM nginx.exe in command prompt

Now when i use netstat -n -a -o | findstr "0.0.0.0:80" i dont see any process running on port 80 but still i can see the nginx homepage in port 80?

I dont know how to stop that process

Thanks


Solution 1:

Use nginx -s stop to stop all nginx processes

Solution 2:

You can use the code taskkill /f /IM nginx.exe in cmd for removing all the running nginx process in windows

Or use nginx -s stop

Solution 3:

First Way (Manually):

Know the /PID by Command: tasklist /fi "imagename eq nginx.exe" and taskkill /f /pid *pid of nginx.exe*.

Second Way (Pragmatically):

If you want to terminate with batch script (save as nginx_terminator.bat):

@echo off
::===============================
::=======NGINX TERMINATER========
::===============================
::[Author:WinPhay Date:8.29.2017]
::===============================
:LOOP
tasklist | find /i "nginx.exe">nul  && Taskkill /F /IM  "nginx.exe" & exit/b
timeout /t 30
goto:LOOP

For more information read the Nginx for Windows documentation.