title: Changing Nginx Log File Location
body: <p>I can't get any changes in the /etc/nginx/nginx.conf http block to be used. I'm starting with the simplest thing - I want to modify the name of  access.log to something else (ie a.log). It is a vanilla nginx install (no custom config files yet). Here's what I know:</p>
  
  <ul>
  <li>changing a value in the head of nginx.conf does affect the configuration (changing worker_processes 4 to worker_processes 2 does change the # of workers)</li>
  <li>Making a syntax error in nginx.conf's http block <em>does</em> cause nginx to throw an error on restart</li>
  <li>Changing access_log to access_log /var/log/nginx/a.log does not modify the location of the log, and nginx in fact continues logging to /var/log/nginx/access.log</li>
  </ul>
  
  <p>Here is a snippet of my nginx.conf file:</p>
  
  <pre><code>user www-data;
  worker_processes 4;
  pid /run/nginx.pid;
  
  events {
          worker_connections 768;
  }
  
  http {
          include /etc/nginx/mime.types;
          default_type application/octet-stream;
  
          access_log /var/log/nginx/a.log;
          #....
  }
  </code></pre>
  
  <p>Is it something as simple as I'm modifying an http block that gets overwritten by some other config file? Thanks for the help.</p>