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

nginx在windwos中的使用

时间:2015-10-04 13:36:22      阅读:277      评论:0      收藏:0      [点我收藏+]

标签:

本文章参考了 nginx for windows的介绍:http://nginx.org/en/docs/windows.html

你从官网上下载到的是一个 zip 格式的压缩包,首先要把压缩包解压。

进入解压出的文件夹,可以看到有 conf html 等一些文件夹,还有一个叫 nginx.exe 的可执行文件。

打开一个命令提示符,然后切换到有nginx.exe的那个目录。

执行 start nginx,然后使用 tasklist 命令查看是否有一个叫 nginx.exe 的进程,如果有说明启动成功,如果没有,就查看 ./logs/error.log,有可能你的 80 端口被占用。

ps:nginx for windows 作为一个标准的控制台应用来运行,而不是一个服务。

以下是相关的一些命令:

nginx -s shutdown  //快速关闭

nginx -s quit   //优雅地关闭

nginx -s reload   //相当于重启吧,它会重新加载配置文件,你可以用它来优雅地关闭一个老的进程

nginx -s reopen  //re-opening log files,重新打开日志文件?不知有什么用。。。

 

已知的问题:

不管启动了多少个进程,只有一个进程用于处理所有的工作。(应该是这个意思吧)

进程不能处理超过1024个同时的连接。

The cache and other modules which require shared memory support do not work on Windows Vista and later versions due to address space layout randomization being enabled in these Windows versions.(不敢贸然翻译)

 

未来可能会提高的:

作为服务运行。

Using the I/O completion ports as a connection processing method.

Using multiple worker threads inside a single worker process.

nginx在windwos中的使用

标签:

原文地址:http://www.cnblogs.com/zhanghaha/p/4854464.html

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