title: Nginx and flask static directory - CSS not linking correctly
body: <p>This is my static directory:</p>
  
  <ul>
  <li>/var/www/myapp/app/static/css </li>
  <li>/var/www/myapp/app/static/js</li>
  <li>/var/www/myapp/app/static/img</li>
  </ul>
  
  <p>In my nginx config I have this:</p>
  
  <pre><code>location /static {
      alias /var/www/myapp/app/static;
      expires 30d;
      access_log off;
  }
  </code></pre>
  
  <p>In my template I then use something like this:</p>
  
  <pre><code>&lt;img height="60" src="{{url_for('static', filename='img/logo.jpg')}}"&gt;&lt;/img&gt;
  </code></pre>
  
  <p>However, it doesn't render. When I view the source of my HTML page running under flask it renders it like this:</p>
  
  <pre><code>&lt;img height="60" src="/static/img/logo.jpg"&gt;
  </code></pre>
  
  <p>What am I doing wrong here? </p>