Building nginx from Source on Windows

Igal @ Lucee.org igal at lucee.org
Sun Dec 27 06:14:01 UTC 2015


Hi,

I posted a question at 
http://stackoverflow.com/questions/34478016/building-nginx-from-source-on-windows 
-- copied below:

I'm trying to build nginx from source on Windows. I got the following done:

1) Installed mingw, gcc, and msys

2) Downloaded the nginx source code

3) Ran the following in the msys console from the nginx source folder:

|$ auto/configure --with-cc=gcc --without-http_rewrite_module 
--without-http_gzip_module (output omitted) $ make -f objs/Makefile 
(output omitted) $ make install -f objs/Makefile (output omitted) |

This produced the nginx.exe file in the objs folder, but when I tried to 
run it I get the following error:

|$ nginx.exe nginx: [alert] could not open error log file: CreateFile() 
"/usr/local/nginx/logs/error.log" failed (3: The system cannot find the 
path specified) 2015/12/26 21:49:25 [emerg] 10200#9700: CreateFile() 
"/usr/local/nginx/conf/nginx.conf" failed (3: The system cannot find the 
path specified) |

But when I run|ls /usr/local/nginx|I see that 
the|conf|and|logs|directories are there, and the conf directory has some 
files in it:

|$ ls -l conf total 34 -rw-r--r-- 1 Admin Administrators 1077 Dec 26 
21:30 fastcgi.conf -rw-r--r-- 1 Admin Administrators 1077 Dec 26 21:30 
fastcgi.conf.default -rw-r--r-- 1 Admin Administrators 1007 Dec 26 21:30 
fastcgi_params -rw-r--r-- 1 Admin Administrators 1007 Dec 26 21:30 
fastcgi_params.default -rw-r--r-- 1 Admin Administrators 2837 Dec 26 
21:30 koi-utf -rw-r--r-- 1 Admin Administrators 2223 Dec 26 21:30 
koi-win -rw-r--r-- 1 Admin Administrators 3957 Dec 26 21:30 mime.types 
-rw-r--r-- 1 Admin Administrators 3957 Dec 26 21:30 mime.types.default 
-rw-r--r-- 1 Admin Administrators 2656 Dec 26 21:30 nginx.conf 
-rw-r--r-- 1 Admin Administrators 2656 Dec 26 21:30 nginx.conf.default 
-rw-r--r-- 1 Admin Administrators 636 Dec 26 21:30 scgi_params 
-rw-r--r-- 1 Admin Administrators 636 Dec 26 21:30 scgi_params.default 
-rw-r--r-- 1 Admin Administrators 664 Dec 26 21:30 uwsgi_params 
-rw-r--r-- 1 Admin Administrators 664 Dec 26 21:30 uwsgi_params.default 
-rw-r--r-- 1 Admin Administrators 3610 Dec 26 21:30 win-utf |

I tried to run|$ chmod -R 0777 conf|but that did not seem to make a 
difference.

What am I doing wrong? And how can I change it so that the logs and conf 
files will be searched in the local directory of nginx.exe and not in 
the|/usr/local/nginx folder|(which I found after some searching 
at|msys\1.0\local\nginx|)?

Thanks!



-- 

Igal Sapir
Lucee Core Developer
Lucee.org <http://lucee.org/>

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


More information about the nginx mailing list