title: nginx multiple map conditions on one variable
body: <p>I'm trying to exclude both an ip address as well as a user agent from appearing in any of my vhost's logs. Each vhost has its own logfile configured in the respective file. I appended <code>$if=$variable</code> to each of the logfile definitions and added this to nginx.conf:</p>
  
  <pre><code>map $http_user_agent $variable {
    ~MyUserAgent 0;
    default 1;
  }
  </code></pre>
  
  <p>This works. Now I want to add conditions, e.g. an IP address to this variable (without having to change every single vhost's configuration again).</p>
  
  <p>If it's possible to configure this globally, while keeping the different logfile locations that would be a feasable solution as well.</p>