On 08/26/2014 10:53 AM, simendsjo wrote:

On 08/26/2014 02:26 AM, Dicebot wrote:

Ages ago I remember using something like this:

server
{
    listen 80   default_server;
    server_name example.com

    location /static/
    {
        root    /home/www-example/static/;
        expires 1d;
    }

    location /
    {
        proxy_pass       http://localhost:8080;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
    }
}

tl; dr: simply defining expires for location of static did the trick

Thanks, that worked.

Well.. The caching worked, but it seems it then doesn't find the
resources.. Very strange.