]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nginx/templates/default/nginx.conf.erb
Fix munin_plugin resource
[chef.git] / cookbooks / nginx / templates / default / nginx.conf.erb
index a895af303c46e8b930625ada40ddee164e267b4b..67b080bf16d443a613b0faaf6076d730e915a07a 100644 (file)
@@ -19,11 +19,13 @@ http {
 
     server_names_hash_bucket_size 128;
 
+<% if node[:nginx][:access_log] -%>
     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                       '$status $body_bytes_sent "$http_referer" '
                       '"$http_user_agent" "$http_x_forwarded_for"';
 
-    access_log  /var/log/nginx/access.log  main  buffer=32k flush=1m;
+    access_log  <%= node[:nginx][:access_log] %>  main  buffer=32k flush=1m;
+<% end -%>
 
     keepalive_timeout  65;