I\'m attempting to set up browser caching on nginx with Django. The current (working) configuration of my nginx configuration file for static files is the following:
<
You are missing the root
directive for the images location block. Therefore, nginx will look for the files in the default location which varies by installation and since you have most likely not placed the files there, you will get a 404 Not Found error.
It works for the /static/
location block because you defined an alias. I suspect though that the alias is simply what should be the root for both. If so, then try ...
server {
listen 443 ssl;
server_name SERVER;
root /path/to/web/root/folder/;
[...]
# Your locations ... Most likely no need for alias in any.
}