Welcome! Log In Create A New Profile

Advanced

How to compile nginx in Windows?

Posted by sxh389 
How to compile nginx in Windows?
August 13, 2015 09:01AM
Hi,

I have tried several days to compile nginx from source in Windows.

I am under Windows 10, with mingw, VS2015 and clang at hand.

I have several tries, and none of them works:

1. I've downloaded the version from github master branch.
here is the configure:

auto/configure --with-cc=gcc --prefix="c:\nginx" --without-http_rewrite_module --without-http_gzip_module

It compiles successfully and runs, but when accessing the very basic index.html from browser, I have been kept getting:

2015/08/13 20:31:46 [alert] 25500#25508: *2 WSARecv() failed (10055: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full) while reading client request line, client: 127.0.0.1, server: localhost, request: "���'

in the error log. And the connection always resets,

2. I tried to compile it with clang, But clang won't understand some of the definitions.
here is the configure:

auto/configure --with-cc=clang --prefix="c:\nginx" --without-http_rewrite_module --without-http_gzip_module

3. I've downloaded the 1.9.2 version source from http://wiki.nginx.org/Install and with mingw
here is the configure:

./configure --with-cc=gcc --prefix="c:\nginx" --without-http_rewrite_module --without-http_gzip_module
and the make process failed for "no rule to make target 'src/os/win32/nginx_win32_config.h'

4.I've downloaded source form http://hg.nginx.org/nginx
here is the configure:
auto/configure --with-cc=gcc --prefix="c:\nginx" --without-http_rewrite_module --without-http_gzip_module

and the make process failed for "no rule to make target 'objs/src/core/ngx_file.o'

5.for 1.9.2 and source from hg, clang fails the same as #2.

I need to build nginx on windows with a custom module, any idea how I can build a workable nginx from source?
Re: How to compile nginx in Windows?
August 13, 2015 09:27AM
Try this version http://nginx-win.ecsds.eu/
pre-compiled.

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: How to compile nginx in Windows?
August 13, 2015 07:51PM
I need to compile my own module with nginx, so the whole point is not using a pre-built version.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 252
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready