nginx for Windows

zt from nginx official site.

Known issues
Possible future enhancements

Version of nginx for Windows uses the native Win32 API (not the Cygwin emulation layer). Only the select() connection processing method is currently used, so high performance and scalability should not be expected. Due to this and some other known issues version of nginx for Windows is considered to be a beta version. At this time, it provides almost the same functionality as a UNIX version of nginx except for XSLT filter, image filter, GeoIP module, and embedded Perl language.

To install nginx/Windows, download the latest development version distribution (1.3.4), since the development branch of nginx contains all known fixes. Then unpack the distribution, Go to the nginx-1.3.4 directory, and run nginx. Here is an example for the drive C: root directory:

cd c:unzip nginx-1.3.4.zip
cd nginx-1.3.4
start nginx

Run the tasklist command-line utility to see nginx processes:

C:\nginx-1.3.4>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 does not start, look for the reason in the error log filelogs\error.log. If the log file has not been created, the reason for this should be reported in the Windows Event Log. If an error page is displayed instead of the expected page, also look for the reason in the logs\error.log file.

nginx/Windows uses the directory where it has been run as the prefix for relative paths in the configuration. In the example above, the prefix is C:\nginx-1.3.4\. Paths in a configuration file must be specified in UNIX-style using forward slashes:

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

nginx/Windows runs as a standard console application (not a service), and it can be managed using the following commands:

nginx -s stop fast shutdown
nginx -s quit graceful shutdown
nginx -s reload changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes
nginx -s reopen re-opening log files

Known issues

  • Although several workers can be started, only one of them actually does any work.
  • A worker can handle no more than 1024 simultaneous connections.
  • 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.

Possible future enhancements

  • Running as a service.
  • Using the I/O completion ports as a connection processing method.
  • Using multiple worker threads inside a single worker process.
时间: 2024-10-03 22:47:52

nginx for Windows的相关文章

Centos7+Nginx通过windows CA颁发及配置SSL服务

近期在学习Linux的相关知识,作为一个运维工程师所必备的知识点,一个web服务尤其运行在互联网上的很容易攻击,所以为了保证安全最起码的需要对web服务配置SSL,这样能提高一定的安全性,所以我们今天介绍,Centos7+Nginx通过windows CA颁发及配置SSL服务,当然如果是生成环境的话,一般都会申请第三方证书,比如沃通等第三方证书颁发机构,今天我们主要使用的是内部的windows CA服务为nginx颁发证书,当然也可以使用Nginx的自签名证书,但是那样每次访问都会有相关的警告

为nginx创建windows服务自启动

为nginx创建windows服务自启动 1.下载最新版的 Windows Service Wrapper 程序 下载地址:http://download.java.net/maven/2/com/sun/winsw/winsw/1.9/ 2.把下载的文件(winsw-1.9-bin.exe)复制到nginx目录(D:\nginx-1.4.2) 3.nginx目录下创建一个同名的Windows Service Wrapper的XML配置文件(winsw-1.9-bin.xml) 文件内容如下:

nginx在windows下安装

下载地址 http://nginx.org/en/download.html win和linux版本都在这下载. win版本使用非常方便,纯绿色,解压缩就可以用,启动需要在命令行下,CD到nginx安装目录,执行如下命令: 启动服务:nginx.exe:start nginx.exe 停止服务:nginx -s stop 重新加载配置:nginx -s  reload 但是这样需要手动启动,如果某些操作需要重启服务器的时候,特别是多人操作服务器的时候难免发生忘记启动nginx的情况,所以还是需要

Nginx在Windows平台的配置

Nginx在Windows平台的配置 能够使用Nginx搭建Tomcat集群,并完成负载均衡. 1.什么是Nginx 2.为什么使用Nginx 背景: 互联网飞速发展的今天,大用户量高并发已经成为互联网的主体.怎样能让一个网站能够承载几万个或几十万个用户的持续访问呢?这是一些中小网站急需解决的问题.用单机tomcat搭建的网站,在比较理想的状态下能够承受的并发访问量在150到200左右.按照并发访问量占总用户数量的5%到10%这样计算,单点tomcat网站的用户人数在1500到4000左右.对于

nginx for windows 安装

一.nginx for windows 的安装地址: http://nginx.org/en/download.html 二.nginx 安装地址: http://nginx.org/en/docs/windows.html 三.开始安装 1.将下载的nginx的文件解压 nginx的目录结构:conf:配置文件 html:默认的资源文件 log:访问日志和错误日志 2.打开dos命令,找到nginx的文件夹下,启动nginx 如果有报错,可以查看log日志里面的error.log文件 3.查看

疏于整理ELK NGINX kvm windows

最近整理了两个方案,抽时间整理成文,以便以后翻阅: 1,研究了一段时间ELK ,案例是分析线上 nginx 日志,汇总统计报表,在这一面,ELK 的确很强大 2.为了提高自动生成kvm windows 虚拟机的效率,研究了自动配置Ip,自动封装系统,无人值守的kvm windows 自动生成方案,费了些时间 实在没时间整理文章,抽空这两类 分几个篇幅整理出来.线上已经用起来,目测效果还可以.

Nginx + Tomcat Windows下的负载均衡配置

一.为什么需要对Tomcat服务器做负载均衡?    Tomcat服务器作为一个Web服务器,其并发数在300-500之间,如果超过500的并发数会出现Tomcat不能响应新的请求的情况,严重影响网站的运行.同时如果访问量非常大的情况下,Tomcat的线程数会不断增加.因此会占据大量内存,严重时出现内存溢出的现象,这时需要重启Tomcat以释放内存,阻断了网站的运行.    所以对Tomcat做负载均衡便很有必要.目前可以和Tomcat做负载均衡的主流服务器是Apache,但是Nginx由于功能

nginx在windows下多域名简单配置

1. windows下安装nginx的目录结构如下: 2. 在nginx-1.12.1目录下conf/nginx.conf 内容 #user nobody; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { liste

配置nginx实现windows/iis应用负载均衡

nginx是俄罗斯人开发的一款跨平台的高性能HTTP和反向代理服务器,可以利用它实现web应用服务器的负载均衡. 反向代理是指将用户请求通过代理服务器转发给后端内部网络的应用服务器,典型的应用比如配置nginx.lighttpd等反向代理软件实现负载均衡.与反向代理相对应的叫正向代理,典型的应用比如vpn.用户直接访问google网站访问不了,而代理服务器可以访问google网站.这样用户就通过访问代理服务器,从而间接的达到访问google网站的目的. 负载均衡是指将用户发起的大量web请求通过