2π
β
It looks the twitter.png file gets a 404:
HTTP/1.1 404 Not Found
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html
Date: Sun, 06 Nov 2016 06:44:39 GMT
Server: nginx
Vary: Accept-Encoding
Hereβs a modified version of the solution by Nicholas Kuechler
location ~* \.(png|jpe?g|gif|ico|tiff)$ {
expires max;
log_not_found off;
access_log off;
}
If itβs getting 404, you likely have the root directive incorrectly setup for location-block inheritance. Confirm that the root (DocumentRoot) is correct, and that the file exists relative to the root path, and it should show.
π€Zach
0π
You could also follow this guide for uWSGI and NGINX to replace apache, and set up static files as an alias in a location block instead, and add the headers from my previous answer.
http://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html
π€Zach
- [Answered ]-Seeding a MySQL DB for a Dockerized Django App
- [Answered ]-Django Pillow install on Amazon EC2
- [Answered ]-Django database connection issue
- [Answered ]-Revelants queries suggestion for autocomplete with Solr
Source:stackexchange.com