Welcome! Log In Create A New Profile

Advanced

Overriding configuration variables, specifically access_log

Adam Nelson
August 18, 2011 12:38PM
We are using nginx/1.0.5 from the nginx apt repositories and have noticed
that when setting the access_log directive in /etc/nginx/conf.d/common, it
does nothing unless I comment out the access_log directive above it in
/etc/nginx/nginx.conf.

It appears that the variable is evaluated only the first time in any given
block (in this case inside the http { } block) and cannot be overridden. Is
that the case?

If so, I think the best solution is to move the access_log directive inside
each of the individual location { } blocks where I need it so as not to
interfere with the stock nginx.conf file.

The only other alternative I can think of is to overwrite the nginx.conf
file entirely - I'm concerned about doing that because I don't want that
file overwritten by the nginx aptitude installer in the future.

Does anybody have a good solution to this?

Cheers,
Adam
---
UX/UI/IA positions available @ http://yipit.com/about/jobs/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Overriding configuration variables, specifically access_log

Adam Nelson August 18, 2011 12:38PM

Re: Overriding configuration variables, specifically access_log

Dick Middleton August 18, 2011 12:50PM

Re: Overriding configuration variables, specifically access_log

Adam Nelson August 18, 2011 12:54PM

Re: Overriding configuration variables, specifically access_log

Igor Sysoev August 18, 2011 01:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 138
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready