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

Kasper Grubbe kasperg at
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

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!

    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;

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

More information about the nginx mailing list