最近 需要用到 ngx_http_sub_module 来解决局域网边界的问题,但是只有一台Windows服务器可用,所以研究一下怎样在 Windows下添加 ngx_http_sub_module。
首先下载 Nginx 源码 ,需要先安装Mercurial 具体方法可以看 Nginx 官网教程 http://nginx.org/en/docs/howto_build_on_win32.html。
安装完 Mercurial 使用下面命令活动 Nginx 源码。
hg clone http://hg.nginx.org/nginx
安装 MSYS ,启动msys.bat并cd到nginx源码目录下执行:
./auto/configure -–prefix=”c:/nginx” -–with-cc-opt=”-D FD_