10

I've run nginx once and now I cannot get rid of it. when I run apache on my server localhost still point to that welcome to nginx i dont know why. I'm on windows 7.

5
  • Are you sure that your Apache does not point to the directory where the nginx welcome page still lies? What port have you configured Apache to run on? And what does ist say, when you start Apache up? If nginx is still running you should get a message that the port 80 (or whatever you use) is still bound. Sep 2, 2012 at 21:23
  • well it doesnt say anything but I added DocumentRoot "c:/www" in the httpd.config and it doesnt not take it into account...... Sep 2, 2012 at 21:31
  • probably it links to the same folder but i got rid of all nginx files and I dont know where thoses two set their default folder for local host Sep 2, 2012 at 21:32
  • You probably find them quite fast when you start a file search for index.html and have a look for the directories that come up then. In one of them should be the old nginx stuff. However - just because the welcome pages come up - does not mean that anything of the nginx server remains. Sep 2, 2012 at 21:38
  • yes i think i found why.I found the directory of apache shoudl be good from now. Thank you i will erase this post Sep 2, 2012 at 21:47

1 Answer 1

32

To kill nginx process.

If you are sure nginx is actually running, You just need to kill nginx.exe process and re-run apache.

Open Run (Window key + R) OR commend prompt (cmd.exe) and Paste below command,

taskkill /F /IM nginx.exe


To find which process is holding port 80.

Here is netstat command & output to find which process is holding port 80.

C:\> netstat -n -a -o | findstr "0.0.0.0:80"
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       1588

^ Here, 1588 is PID of process holding port 80.

So, below is sample command to get Process name from PID 1588.

C:\> tasklist /svc /FI "PID eq 1588"

Image Name                     PID Services
========================= ======== ============================================
nginx.exe                     1588 N/A

So, it shows that nginx.exe is holding port 80.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.