Welcome! Log In Create A New Profile

Advanced

Cannot even start nginx on windows

Posted by phil3361 
Cannot even start nginx on windows
April 03, 2014 08:46AM
Hi all,

I cannot start nginx on Windows.

I successfully installed nginx at home on a debian wheezy (the "raspbian", in fact, on Raspberry Pi)... but I just followed a tutorial and I am still a newbie!

I am trying to reproduce this at work, on my professional PC (Windows 7): I am prospecting this way for my project too :-)

I downloaded nginx 1.5.12 from the download page, unzipped it as c:\nginx\nginx.exe (with its work folders aside, as in the zip).

Without configuring anything, I double cliqued on nginx.exe and got nothing (except one very short blink of the application console, I guess).

I then opened a DOS window to launch the server, and got the following errors:

D:\Users\phil>c:\nginx\nginx.exe
nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: FormatMessage() error:(15100))
2014/04/03 11:30:01 [emerg] 2356#6140: CreateFile() "D:\Users\phil/conf/nginx.conf" failed (3: FormatMessage() error:(15105))
D:\Users\phil>

(see joined bmp file)
Note that the first error is also visible in the Windows EventLog

Can somebody help me?

Thanks in advance,
Philippe.
Attachments:
open | download - nginxFailedToStart.png (52.3 KB)
Re: Cannot even start nginx on windows
April 03, 2014 09:45AM
Hi again,

I solved the issue by just 'cd'-ing to the nginx.exe folder before running the server:

d:\Users\phil> c:
c:\> cd nginx
c:\nginx> nginx.exe

... this is working.

May someone tell me if this working folder can be configured somewhere in nginx?

Hope this helps,
PHilippe.
Re: Cannot even start nginx on windows
April 03, 2014 09:54AM
See the nginx.conf file in /conf
Re: Cannot even start nginx on windows
April 03, 2014 10:05AM
Thanks for the answer, itpp2012, but could you please give details?

I cannot find any absolute path in nginx.conf, even after some '#'... Do you mean that I have to change all 'root' relative pathes to their absolute form?

Thanks,
Philippe.
Re: Cannot even start nginx on windows
April 03, 2014 01:14PM
Its fairly simple;

for example:
error_log d:/webroot/logs/error.log;

or:
root 'd:/cache/root/xcadmin';

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: Cannot even start nginx on windows
April 04, 2014 06:42AM
I see.

My question was really from a newbie :-)

Thanks,
Philippe
Re: Cannot even start nginx on windows
December 02, 2021 06:16PM
I've got the same problem. Only that nginx won't start even if I CD\nginx and run nginx from there.

C:\Users\Admin>cd\nginx

C:\nginx>nginx

C:\nginx>
C:\nginx>
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 184
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