NGINX looks for /logs/error.log as default?

Kasper Grubbe kasperg at benjamin.dk
Mon Oct 22 12:01:17 UTC 2012


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:

# main error log
error_log log/nginx.error.log debug;
worker_processes  1;

events {
    worker_connections  1024;
}

http {
  include       mime.types;
  default_type  application/octet-stream;

  # main access log
  access_log log/nginx.access.log combined;

  sendfile      on;

  keepalive_timeout  65;

  server {
    listen 9002; #omg!
    server_name local.woman.dk;

    rewrite ^/(.*)/$ /$1 last;

    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_max_temp_file_size  0;

    location / {
      ssi on;
      proxy_pass http://127.0.0.1:3000;
    }
  }
}

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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121022/d2460a64/attachment.html>


More information about the nginx mailing list