码迷,mamicode.com
首页 > Windows程序 > 详细

Windows 下 nginx安装

时间:2015-12-19 01:20:25      阅读:352      评论:0      收藏:0      [点我收藏+]

标签:

比较官方的参考 http://nginx.org/en/docs/windows.html

 

1. 下载windows下的版本 http://nginx.org/en/download.html, 我下载的是 1.9.9

 

2. 解压缩到 c\nginx-1.9.9

 

3. 管理运行cmd, 执行命令

cd c:\nginx-1.9.9

4. 执行 start nginx

正常情况应该执行完毕后,敲入 127.0.0.1,显示:

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

 

结果是,弹出一个命令框,然后就没有然后了。

执行:tasklist /fi "imagename eq nginx.exe"

会告诉你没有找到相关的。

这时候你需要 打开 c:\nginx-1.9.9\logs\error.log

会有一段话:

2015/12/17 23:54:55 [emerg] 7420#7416: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)

简单说因为权限被禁止,百度一下才知道有人有相关问题,

参考文章:http://blog.csdn.net/love__coder/article/details/7421706

1、打开注册表:regedit

2、找到:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP

3、找到一个REG_DWORD类型的项Start,将其改为0

4、重启系统,System进程不会占用80端口

重启之后,start nginx.exe 。在浏览器中,输入127.0.01,即可看到亲爱的“Welcome to nginx!” 了

 

Windows 下 nginx安装

标签:

原文地址:http://www.cnblogs.com/mouse_in_beijing/p/5058544.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!