Hello, I have a problem with NGINX version 1.2.4 it will constantly look
for /logs/error.log, even though I have defined another error.log in my
configuration.
I start NGINX like this:
nginx -p . -c config/nginx/development.conf
My development.conf is fairly simple and looks like this:
But NGINX don’t want to start because ./logs/error.log doesn’t exist.
This
is my error:
[ben2 (master)]=> nginx -p . -c config/nginx/development.conf
nginx: [alert] could not open error log file: open() “./logs/error.log”
failed (2: No such file or directory)
Nginx have to write log even before it read config file, so nginx try to
open file specified
by --error-log-path or relative to --prefix configure options.
On Monday 22 October 2012 16:01:17 Kasper G. wrote:
Hello, I have a problem with NGINX version 1.2.4 it will constantly look
for /logs/error.log, even though I have defined another error.log in my
configuration.
[…]
But NGINX don’t want to start because ./logs/error.log doesn’t exist. This
is my error:
[ben2 (master)]=> nginx -p . -c config/nginx/development.conf
nginx: [alert] could not open error log file: open() “./logs/error.log”
failed (2: No such file or directory)
Am I doing it wrong?
Nginx must have access to error log before it will parse configuration.
See also the “–error-log-path=” configure parameter. http://www.nginx.org/en/docs/install.html