zoukankan      html  css  js  c++  java
  • nginx在windwos中的使用

    本文章参考了 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.

  • 相关阅读:
    NotMapped属性特性
    html.EditorForModel自定义模版
    ASP.NET MVC Core的TagHelper (高级特性)
    C#静态构造函数调用机制
    ASP.NET Forms 身份认证
    特别需要注意!
    观后感
    python进阶日记(生成器)
    python进阶日记(try except)
    python进阶日记(lambda函数)
  • 原文地址:https://www.cnblogs.com/vanwoos/p/4854464.html
Copyright © 2011-2022 走看看