Nginx for Windows With http_v2_module 编译日记

本文发布于 ,内容可能和实际情况存在出入。如果文章存在错误欢迎指正,我会根据情况对文章进行修改或做隐藏处理

本文被标记为隐藏,可能是由于存在错误或其他原因。将内容作为参考时请谨慎

最近看到好多菊苣的BLOG都换上了http/2
我的博客因为服务器都在国内所以觉得上HTTPS没啥用
刚好我的Gravatar中转服务器在用nginx,看了介绍挺诱人的,就决定换【最近因为老抽风所以换成多说的缓存】
在配置里加了http2之后重启服务出现:

2015/12/31 15:44:36 [emerg] 2640#1344: the "http2" parameter requires
ngx_http_v2_module in C:\nginx/conf/nginx.conf:21

然后就在网上找Windows用的模块(因为服务器主要是搭VPN用的【纯粹为了加速游戏,绝对没下过那些东西】所以就装了Windows系统)
【怎么可能有单独的模块啊,又不是Tengine】

然后就找到了这篇:http://nginx.org/en/docs/howto_build_on_win32.html
在Windows环境下编译Windows版的Nginx

编译的时候有几点注意:
最后一步make要在VS的命令行下进行,直接用MSYS的make貌似会出错
因为OpenSSL选了1.0.2版的编译了4次都没成功,换成1.0.1版的就成功了

最后附上编译好的nginx:nginx.zip 【防盗链作大死请直接点链接下载要不找不到文件【顺便吐槽一下Typecho的附件上传

标签: none

已有 8 条评论

  1. 拿来用用先

  2. 不错不错,更新到1.9.10了,要保持更新哟。可以在文里标注一下当前是多少版本嘛。官网也不直接编译进去,真是的

  3. ddatsh
    ddatsh

    你这地址403了呀openssl  1.0.2f我已经编译好了nginx version: nginx/1.9.12built by clbuilt with OpenSSL 1.0.2f  28 Jan 2016TLS SNI support enabledconfigure arguments: --with-cc=cl --with-cc-opt='-D FD_SETSIZE=4096' --builddir=objs --prefix= --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-body-temp-path=temp/client_body_temp --http-proxy-temp-path=temp/proxy_temp --http-fastcgi-temp-path=temp/fastcgi_temp --with-pcre=objs/lib/pcre-8.32 --with-zlib=objs/lib/zlib-1.2.7 --with-openssl=objs/lib/openssl-1.0.2f --with-select_module --with-http_ssl_module --with-http_v2_module

    1. 防盗链作大死,直接点击链接就好了

      1. ddatsh
        ddatsh

        嗯,以后我就用自己编译的版本喽,1.0.2f有特殊的编译方法

        1. 发个给我啊,!

        2. 发个给我啊,!

添加新评论