does not work on any request on windows

crsarang at gmail.com crsarang at gmail.com
Fri Nov 11 08:05:13 UTC 2016







I was build nginx for window on linux. (compiler: x86_64-w64-mingw32-gcc) 


and build succeeded. 


 


but It does not work on any request.. as if it hang status... 


 


I was checked function ngx_http_wait_request_handler in ngx_http_request.c on windows gdb. 


One unique feature is the server_name.


 


Case1. Configure prefix “ “


(gdb) p cscf->server_name


$3 = {len = 1, data = 0x2d4e38f "_カカカカカカカカ"}


(gdb) p cscf->server_name->data


$4 = (u_char *) 0x2d4e38f "_"


 


Case2. Configure prefix “./”


(gdb) p cscf->server_name->data


$1 = (u_char *) 0x2c85c81 "_./html"


 


 


And remain debug log.


WSARecv() failed (10014: The system detected an invalid pointer address in attempting to use a pointer argument in a call) while waiting for request, client: 127.0.0.1, server: 0.0.0.0:80


client timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while waiting for request, client: 127.0.0.1, server: 0.0.0.0:80


 


 


how to fix ?? 


 


test nginx version : 


nginx-release-1.11.5 


nginx-release-1.10.2 


nginx-release-1.9.15 


nginx-release-1.8.1 


 


module version: 


encrypted-session-nginx-module-0.06 


lua-nginx-module-0.10.6 


lua-nginx-module-0.10.7 


ngx_devel_kit-0.3.0 


set-misc-nginx-module-0.31 


 


 


etc... 


LuaJIT-2.0.2 


LuaJIT-2.0.3 


LuaJIT-2.0.4 


lua-cjson-2.1.0 


cJSON- I don`t know 


openssl-1.0.2j 


zlib-1.2.8 


 


 


configure script: 


TARGET=" " 


 


export CC=x86_64-w64-mingw32-gcc 


 


export CFLAGS 


export LDFLAGS 


 


export LUAJIT_INC=$COMMON_DIR/include/luajit-2.0.4 


export LUAJIT_LIB=$WIN_OUT/lib 


export OPENSSL_INC=$COMMON_DIR/include 


export OPENSSL_LIB=$WIN_OUT/lib 


 


 


echo $LUAJIT_INC 


echo $LUAJIT_LIB 


echo $OPENSSL_INC 


echo $OPENSSL_LIB 


 


./configure_win --prefix=$TARGET \ 


--crossbuild=win32 \ 


--sbin-path=nginx.exe \ 


--with-cc=x86_64-w64-mingw32-gcc \ 


--with-cpp=x86_64-w64-mingw32-c++ \ 


--with-zlib=../../../open_source/zlib-1.2.8/zlib-1.2.8 \ 


--with-openssl=../../../open_source/openssl-1.0.2j/openssl-1.0.2j \ 


--with-pcre=../../../open_source/pcre-8.34/pcre-8.34 \ 


--add-module=../nginX_if/source \ 


--add-module=../lua/ngx_devel_kit-master \ 


--add-module=../lua/set-misc-nginx-module-master \ 


--add-module=../lua/lua-nginx-module \ 


--add-module=../lua/encrypted-session-nginx-module-master \ 


--conf-path=./conf/nginx.conf \ 


--pid-path=./log/nginx.pid \ 


--error-log-path=./log/ngx_error.log \ 


--http-log-path=./log/ngx_access.log \ 


--http-client-body-temp-path=./log/client_body_temp \ 


--http-proxy-temp-path=./log/proxy_temp \ 


--http-fastcgi-temp-path=./log/fastcgi_temp \ 


--http-uwsgi-temp-path=./log/uwsgi_temp \ 


--http-scgi-temp-path=./log/scgi_temp \ 


--with-cc-opt=" -ggdb " \ 


--with-ld-opt="-L$WIN_OUT/lib -lm -lcJSON " \ 


--with-http_ssl_module


 


 


 


 


nginx.conf 


#user nobody; 


worker_processes 1; 


 


#error_log logs/error.log; 


#error_log logs/error.log notice; 


#error_log logs/error.log info; 


 


#pid logs/nginx.pid; 


 


 


events { 


worker_connections 1024; 


} 


 


 


http { 


include mime.types; 


default_type application/octet-stream; 


 


#log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 


# '$status $body_bytes_sent "$http_referer" ' 


# '"$http_user_agent" "$http_x_forwarded_for"'; 


 


#access_log logs/access.log main; 


 


sendfile on; 


#tcp_nopush on; 


 


#keepalive_timeout 0; 


keepalive_timeout 65; 


 


#gzip on; 


 


server { 


listen 80; 


server_name _; 


 


#charset koi8-r; 


 


#access_log logs/host.access.log main; 


 


location / { 


root html; 


index index.html index.htm; 


} 


 


#error_page 404 /404.html; 


 


# redirect server error pages to the static page /50x.html 


# 


error_page 500 502 503 504 /50x.html; 


location = /50x.html { 


root html; 


} 


 


# proxy the PHP scripts to Apache listening on 127.0.0.1:80 


# 


#location ~ \.php$ { 


# proxy_pass http://127.0.0.1; 


#} 


 


# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 


# 


#location ~ \.php$ { 


# root html; 


# fastcgi_pass 127.0.0.1:9000; 


# fastcgi_index index.php; 


# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 


# include fastcgi_params; 


#} 


 


# deny access to .htaccess files, if Apache's document root 


# concurs with nginx's one 


# 


#location ~ /\.ht { 


# deny all; 


#} 


} 


 


 


# another virtual host using mix of IP-, name-, and port-based configuration 


# 


#server { 


# listen 8000; 


# listen somename:8080; 


# server_name somename alias another.alias; 


 


# location / { 


# root html; 


# index index.html index.htm; 


# } 


#} 


 


 


# HTTPS server 


# 


#server { 


# listen 443 ssl; 


# server_name localhost; 


 


# ssl_certificate cert.pem; 


# ssl_certificate_key cert.key; 


 


# ssl_session_cache shared:SSL:1m; 


# ssl_session_timeout 5m; 


 


# ssl_ciphers HIGH:!aNULL:!MD5; 


# ssl_prefer_server_ciphers on; 


 


# location / { 


# root html; 


# index index.html index.htm; 


# } 


#} 


 


}


 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20161111/b7a063a3/attachment.html>


More information about the nginx mailing list