Nginx 安装成Windows 服务

Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器 。 Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的Rambler.ru 站点开发的,它已经在该站点运行超过四年多了。Igor 将源代码以类BSD许可证的形式发布。自Nginx 发布四年来,Nginx 已经因为它的稳定性、丰富的功能集、示例配置文件和低系统资源的消耗而闻名了。目前国内各大门户网站已经部署了Nginx,如新浪、网易、腾讯等;国内几个重要的视频分享网站也部署了Nginx,如六房间、酷6等。新近发现Nginx 技术在国内日趋火热,越来越多的网站开始部署Nginx。

因为 Nginx 的文档大部分是俄文的,本维基的目的是帮助使用中文世界的用户安装、配置和交换有关 Nginx 的使用经验。大部分文档源自(al-nginx AT none.at,Aleksandar Lazic) 的工作,有关本维基本身的问题请直接询问Cliff Wells[1] ,其他翻译请点击

 

官方网站:http://wiki.nginx.org/NginxChs 

 

windows 版本 如何安装成服务?

 

1. 下载nginx windows版本

2. 下载微软的2个工具: instsrv.exe srvay.exe

3.  运行命令

instsrv Nginxc:/nginx/srvany.exe ,这样就安装了一个Nginx的服务

4. 配置Nginx的运行参数

可以直接将配置导入到注册表

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/NGINX/Parameters]
"Application"="C://nginx//nginx.exe"
"AppParameters"=""
"AppDirectory"="C://nginx//"

 

你可以直接下载我打包的Nginx,里面包括了以上所需要的命令和配置。

http://download.csdn.net/source/1696299  

 

注意:windows 下的Nginx 内置的module 很多没有,用Nginx -V 命令查看。

内置的模板包括:

configure arguments: --builddir=objs.msvc8 --crossbuild=win32 --with-debug --pre
fix= --conf-path=conf/nginx.conf --pid-path=logs/nginx.pid --http-log-path=logs/
access.log --error-log-path=logs/error.log --sbin-path=nginx.exe --http-client-b
ody-temp-path=temp/client_body_temp --http-proxy-temp-path=temp/proxy_temp --htt
p-fastcgi-temp-path=temp/fastcgi_temp --with-cc-opt=-DFD_SETSIZE=1024 --with-pcr
e=objs.msvc8/lib/pcre-7.9 --with-openssl=objs.msvc8/lib/openssl-0.9.8k --with-op
enssl-opt=enable-tlsext --with-zlib=objs.msvc8/lib/zlib-1.2.3 --with-select_modu
le --with-http_ssl_module --with-http_realip_module --with-http_addition_module
--with-http_sub_module --with-http_dav_module --with-http_stub_status_module --w
ith-http_flv_module --with-http_gzip_static_module --with-http_random_index_modu
le --with-http_secure_link_module --with-mail --with-mail_ssl_module --with-ipv6

 

注意Memcached 和rewrite 都没有

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值