title: Nginx does not render favicon and statics files are not accessible. serving by Flask
body: <p>I have a files in files and favicon.ico in static folder. Webpages is served by Nginx, favicon is not visible and files are not accessible.  I tried reading some post but they fixing is not working on my.  Here is configuration.
  The webpage is working but icon is not rendering.</p>
  <pre><code>$ cat /etc/nginx/sites-enabled/my_app 
  server {
     
      server_name www.mysite.com;
  
      location /static/ {
          # handle static files directly, without forwarding to the application
          alias /home/ubuntu/mysite/app/static/;
          expires 30d;
      }
  
      location = /_favicon.ico {
      alias /home/ubuntu/mysite/app/static/favicon.ico;
      }
  
      location / {
          # forward application requests to the gunicorn server
          proxy_pass http://localhost:8000;
          proxy_redirect off;
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      }
  
  
      listen 443 ssl; # managed by Certbot
      ssl_certificate /etc/letsencrypt/live/www.mysite.com/fullchain.pem; # managed by Certbot
      ssl_certificate_key /etc/letsencrypt/live/www.mysite.com/privkey.pem; # managed by Certbot
      include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
      ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  
  }
  
  server {
      if ($host = www.mysite.com) {
          return 301 https://$host$request_uri;
      } # managed by Certbot
  
  
      listen 80;
      server_name www.mysite.com;
      return 404; # managed by Certbot
  
  
  }
  </code></pre>
  <p>thanks in advance</p>