Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

migrated from superuser.com May 25 '10 at 3:59

This question came from our site for computer enthusiasts and power users.

1 Answer 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 :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.