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.

  • 相关阅读:
    爬虫大作业
    数据结构化与保存
    使用正则表达式,取得点击次数,函数抽离
    爬取校园新闻首页的新闻
    网络爬虫基础练习
    综合练习:词频统计
    Hadoop综合大作业
    理解MapReduce
    熟悉HBase基本操作
    熟悉常用的HBase操作
  • 原文地址:https://www.cnblogs.com/vanwoos/p/4854464.html
Copyright © 2011-2022 走看看