default_type text/html;
error_page 500 502 503 504 /500.html;
location /500.html {
root __FINALPATH__/srv/ui/public;
}
location /photos {
root __DATA_PATH__/data;
expires 1d;
}
location /thumbnails {
root __DATA_PATH__/data/cache;
expires 1d;
}
location /static-collected {
root __FINALPATH__/srv;
expires 1d;
}
location ~ ^/(admin|graphql|thumbnailer) {
proxy_pass http://localhost:__PORT__;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
}
location / {
root __FINALPATH__/srv/ui/build;
expires 1d;
ssi on;
try_files $uri /index.html =404;
}