1

I structured my sites like:

/home/www/domain.com/public,private, log, backup

In the log folder, I created a blank error.log and access.log.

My nginx file in sites-available for the domain looks like:

server 

{

      access_log /home/www/domain1.com/log/access.log;
      error_log /home/www/domain1.com/log/error.log;

}

Trying to start nginx it says:

starting nginx: the config file /etc/nginx/nginx/conf syntax is ok
[emrg] open() ".../access.log" failed (2: no such file or directory)

Is this a permission issue?

1 Answer 1

1

no it means some directory in absolute path to access log doesn't exist. nginx writes to logfiles from master process, usually running as root(if nginx was started by root). perhaps it's the main access log or a log of some other host, check that yourself by running

grep -n access_log /path/to/nginx.conf

or if you use default sites-* structure run that for all files in there. in fact I don't suggest using that scheme. when you'll suddenly need to alter settings for 200 sites you will have to edit 200+ config files :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .