title: invalid_referer syntax for if in nginx
body: <p>I use this in my <strong>nginx.conf</strong> where <strong>${WWW_URL}</strong> is variable with my web app url</p>
  
  <pre><code>location ~* \.(jpg|png)$ {
      valid_referers none blocked www.${WWW_URL} ${WWW_URL};
  
      if ($invalid_referer) { # line 63
          return 403;
      }
  }
  </code></pre>
  
  <p>But when I start nginx I got</p>
  
  <blockquote>
    <p>[emerg] invalid condition ")" in /etc/nginx/nginx.conf:63</p>
  </blockquote>
  
  <p>I try to change the indent, delete space ... what is the issue on this if statement ?</p>
  
  <p>Thanks</p>