Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using nginx and i have two sites running:

site1 = /1/access.log site2 = /2/access.log

when a user get 404 images not found on site2 nginx writes to access.log of site1 & site2 reporting the not found error, i tried everything to get separated logs without luck, i want everything that happen on site1 logged on /1/access.log and everything that happens on site2 logged on /2/access.log

any help ?

share|improve this question
Can you post your configuration? – Luke Sep 24 '12 at 23:24

Which version of nginx are you using ?

Newer version has /etc/nginx/conf.d/*.conf files where you can mention following parameter for each of your site.

access_log /path/to/access.log error_log /path/to/error.log

Make sure these are set on per *.conf basis.

share|improve this answer

Your Answer


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.