LomoX-Offical / nginx-openresty-windows

nginx for windows with openresty
415 stars 125 forks source link

Guide how to build it #24

Closed AntonTimiskov closed 8 years ago

AntonTimiskov commented 8 years ago

Is there any guide how to build it?

zqzjz0911 commented 8 years ago

using vs 2008 command line and goto directory src/nginx . run nmake to build it. if you just want to use it . you can download through this url 32 bit: http://pan.baidu.com/s/1kUYTLkj 64 bit: http://pan.baidu.com/s/1qXZz82S

thx

lihui0213 commented 8 years ago

I want to set the udp proxy on,then,In nginx/auto/options,I change STREAM=NO to STREAM=YES,I use nmake to build it,but this is not support udp proxy,it is prompt the udp is not support。 and the 64 bit is not linked.Is there any guide how to build it?

zqzjz0911 commented 8 years ago

in this release files, nginx is built with configure arguments: --with-stream

so, it support stream module .please download: 32 bit: http://pan.baidu.com/s/1kUYTLkj 64 bit: http://pan.baidu.com/s/1qXZz82S

lihui0213 commented 8 years ago

In the nginx.conf,I add stream module:

stream {

upstream cloudsocket {

    hash $remote_addr consistent;

    server 192.168.202.91:4321 weight=5 max_fails=3 fail_timeout=30s;

}

 upstream cloud {

    server 192.168.202.91:4444;

}

server {

    listen 2014;

    proxy_connect_timeout 1s;

    proxy_timeout 3s;

    proxy_pass cloudsocket;

}

server {
    listen 53 udp;
    proxy_responses 1;
    proxy_timeout 20s;
    proxy_pass cloud;
}

}

but to run the nginx.exe ,the error.log prompt
[emerg] 9412#9740: the invalid "udp" parameter in D:\Openresty_For_Windows_1.9.15.1001_64Bit\nginx/conf/nginx.conf:152

I want to known how to build the openresty on windows, Maybe later I will add any module.

thank you!

zqzjz0911 commented 8 years ago

offical nginx does not support udp in windows now.

lihui0213 commented 8 years ago

The issue udp proxy in windows,Are there any plan to fix it?

zqzjz0911 commented 8 years ago

i have no idea about that now.

lihui0213 commented 8 years ago

hello,zqzjz0911。 In nginx-openresty-windows-master\src\nginx,I use nmake to build the project,then build the 32-bit success.but I rename the MakefileW64 to Makefile,then I build the 64-bit,than is any faild,like this: 已完成库搜索 nginx.obj : error LNK2019: 无法解析的外部符号 _SSLeay_version,该符号在函数 _ngx_show_version_info 中被引用 ngx_crypt.obj : error LNK2019: 无法解析的外部符号 _SHA1_Init,该符号在函数 _ngx_crypt_sha 中被引用 ngx_http_set_hash.obj : error LNK2001: 无法解析的外部符号 _SHA1_Init ngx_http_lua_string.obj : error LNK2001: 无法解析的外部符号 _SHA1_Init ngx_crypt.obj : error LNK2019: 无法解析的外部符号 _SHA1_Update,该符号在函数 _ngx_crypt_sha 中被引用 ngx_http_set_hash.obj : error LNK2001: 无法解析的外部符号 _SHA1_Update ngx_http_lua_string.obj : error LNK2001: 无法解析的外部符号 _SHA1_Update ngx_crypt.obj : error LNK2019: 无法解析的外部符号 _SHA1_Final,该符号在函数 _ngx_crypt_sha 中被引用 ngx_http_set_hash.obj : error LNK2001: 无法解析的外部符号 _SHA1_Final

please ask me how can I build 64-bit system

my system is 64-bit win7.

zqzjz0911 commented 8 years ago

please use "%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86_amd64" to build 64bit nginx

zqzjz0911 commented 8 years ago

version:1.9.15.1002 support udp in windows. please download it through these urls:

32 bit: http://pan.baidu.com/s/1bpsjbAJ 64 bit: http://pan.baidu.com/s/1slw0ppN