大网数据广告活动
服务器运维问答

How to completely kill NGINX in windows?

· 52CE 我爱测

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 taskk…

问题原文

原帖链接 · Private · CC BY-SA 3.0

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

社区高分解答

原帖链接 · Win Phay · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-04-04)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。