Image styles are not created 404 Not Found
The solution is to add try_files $uri $uri/ @rewrite; at the bottom right after add_header, final snippet with more edits:

location ~* /sites/default/files/.*\.(?:css|js|ico|gif|jpeg|jpg|png|woff|ttf|otf|svg|woff2|eot)$ {
    expires 1w;
    add_header ETag "";
    add_header Cache-Control "max-age=2628000, no-transform, public";
    try_files $uri $uri/ @rewrite;
}


This solves the issue, we use this snipped with AdvAgg module.