`

run nginx in windows

    博客分类:
  • java
阅读更多
内容来自:http://nginx.org/en/docs/windows.html

nginx/Windows uses the native Win32 API (not the Cygwin emulation level). Currently only the select method is used as a notification way, therefore you should not expect high performance and scalability. Because of this and some known issues nginx/Windows is considered as a beta version. There is almost full-functionality in nginx/Windows as in Unix version, except XSLT filter, image filter, GeoIP module, and embedded Perl language.

To install nginx/Windows, you should download the latest 0.8.32 development version zipped file, since the development branch contains all known fixes, especially Windows related. Then you should unzip the file, go to the nginx-0.8.32 directory, and run nginx. Here is an example for the drive C: root directory:

    cd c:\
    unzip nginx-0.8.32.zip
    cd nginx-0.8.32
    start nginx

You may run the “tasklist” command line utility to see nginx processes:

    C:\nginx-0.8.32>tasklist /fi "imagename eq nginx.exe"

    Image Name           PID Session Name     Session#    Mem Usage
    =============== ======== ============== ========== ============
    nginx.exe            652 Console                 0      2 780 K
    nginx.exe           1332 Console                 0      3 112 K

One of the processes is the master process and another is the worker process. If nginx have not started, you should look in the “logs\error.log” file for the reason. If the log file has not been created, the reason should be reported in Windows Event Log. If you see an error page instead of the expected page, you should also look in the “logs\error.log” file for the error reason.

nginx/Windows uses the directory where it has been run as the prefix directory for relative paths in the configuration. In the example above, the prefix directory is “C:\nginx-0.8.32\”. Paths in the configuration must be set in Unix style using slashes:

    access_log   logs/site.log;
    root         C:/web/html;

nginx/Windows runs as an usual application, not a service, and it can be managed using the following commands:

    nginx -s stop quick exit
    nginx -s quit graceful quit
    nginx -s reload changing configuration, starting a new worker, quitting gracefully an old worker
    nginx -s reopen reopening log files

Known issues

    * Although several workers can be run, only one of them works actually.
    * A worker can handle no more than 1024 simultaneous connections.
    * The cache and other modules requires a shared memory support do not work in Windows Vista and later due to address space layout randomization enabled in these Windows versions.

Possible future enhancements

    * Running as a service.
    * Using the I/O completion ports as notification method.
    * Using the worker threads inside single worker.
分享到:
评论

相关推荐

    nginx for windows 1.4 免安装

    nginx for windows 1.4 直接解压到D盘就可以了

    添加nginx-http-flv-module模块并重新编译后的nginx(windows版)

    添加nginx-http-flv-module模块并重新编译后的nginx(windows版)

    Nginx 安装成Windows 服务方法

    Nginx 安装成Windows 服务方法

    Nginx 1.22.0 Windows版本,解压安装。

    Nginx 1.22.0 Windows版本,解压安装。 Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,在BSD-like 协议下发行。其特点是占有内存少,并发能力强,事实上nginx的并发能力在同...

    nginx windows服务安装管理器

    ::nginx windows服务安装管理器 ::用windows服务安装器winsw把nginx安装为系统服务后,此时重新加载配置reload操作会出错,并不能直接管理,要用system用户身份管理,通过psexec可以达到这一目的 ::通过本管理器可以...

    nginx for windows下载安装与配置

    nginx for windows详细的安装教程请登录 http://www.bywei.cn/blog/view.asp?id=104 内容导航: (1)nginx的特性和简介 (2)nginx for windows的下载与安装 (3)nginx处理静态资源的配置 (4)nginx 反向代理设置 (5)...

    nginx for windows下载以及详细安装与配置

    1.目前官方 Nginx 并不支持Windows,您只能在包括Linux,UNIX,BSD系统下安装和使用,现在提供nginx for windows下载以及详细安装与配置,供windows下的nginx应用。 2.Nginx 本身只是一个HTTP和反向代理服务器,它无法...

    windows 下 nginx 日志切割

    windows 下nginx 日志切割 结合windows任务计划,实现每天备份日志,并reopen nginx

    nginx for windows 傻瓜配置

    nginx for windows nginx-1.14.0.rar 第一步: nginx-1.14.0.rar右键解压文件到D盘(不支持中文目录) D:\nginx-1.14.0\nginx.exe 第二步: 拷贝证书到目录cert 第三步: conf/vhosts.conf 修改网站配置文件 server { ....

    nginx源码windows版

    nginx 能在windows vs2010下直接编译运行。 nginx 能在windows vs2010下直接编译运行。

    Windows下Nginx的安装与配置

    此文档详细介绍了Windows下Nginx的安装与配置,可以让用户在最短的时间内完全配置好nginx!

    nginx的Windows移植版

    ngwsx是nginx Web服务器的Windows平台上的移植版本,现在基本上可以对静态文件的请求提供服务。

    windows启动nginx.bat脚本

    windows启动nginx脚本

    nginx for Windows v1.14.2 稳定版

    软件介绍 Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器。 Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的...Tags: nginx稳定版 nginx下载 nginx Windows nginx1.14

    nginx1.24.0 windows版

    nginx1.24.0 windows版

    nginx for Windows - documentation 1.8.pdf

    nginx for Windows - documentation 1.8 版本 的详细配置使用指南,英文原版

    nginx(windows版本)

    Nginx在反向代理、rewrite规则、稳定性、静态文件处理、内存消耗等方面,有很强的优势。 Nginx可以配置多种类型的虚拟主机:基于ip的虚拟主机、基于端口的虚拟主机、基于域名的虚拟主机

Global site tag (gtag.js) - Google Analytics