File: //etc/nginx/conf.d/dsm.syno-app-portal.SynologyPhotos.conf
location ~ ^/mo/(sharing|request)/FotoSocketIo/socket.io/ {
include proxy.conf;
rewrite /mo/(?:sharing|request)/FotoSocketIo(/.*) $1 break;
proxy_set_header Connection $connection_upgrade;
proxy_pass http://unix:/run/synofoto/js-server-websocket.socket;
}
location ~ ^/FotoSocketIo/socket.io/ {
include proxy.conf;
rewrite /FotoSocketIo(/.*) $1 break;
proxy_set_header Connection $connection_upgrade;
proxy_pass http://unix:/run/synofoto/js-server-websocket.socket;
}
location ~ ^/mo/(sharing|request)/([-_\w\d]+)$ {
root /usr/syno/synoman;
rewrite /mo/(?:sharing|request)/([-_\w\d]+)$ /webapi/entry.cgi?api=SYNO.Foto.PublicSharing&version=1&method=get&passphrase="$1" break;
error_page 404 /error_page;
include scgi_params;
scgi_pass synoscgi;
}
location ~ ^/error_page {
internal;
root /var/packages/SynologyPhotos/target/etc;
rewrite (.*) /error_page.html break;
allow all;
}
location ~ ^/mo/(sharing|request)/(.+)\.cgi {
root /usr/syno/synoman;
rewrite /mo/(?:sharing|request)/(.+) /$1 break;
include scgi_params;
scgi_pass synoscgi;
}
location ~ ^/mo/sharing/([-_\w\d]+)/cover.jpg$ {
root /usr/syno/synoman;
rewrite /mo/sharing/([-_\w\d]+)/cover.jpg$ /webapi/entry.cgi?api=SYNO.Foto.PublicSharing&version=1&method=get_album_cover&passphrase="$1" break;
include scgi_params;
scgi_pass synoscgi;
}
location ~ ^/mo/(sharing|request)/(.+)$ {
root /usr/syno/synoman;
rewrite /mo/(?:sharing|request)/(.+) /$1 break;
}
location ~ ^/synofoto/api/v([\d]+)/p/([\w]+)/([\w]+)/([\w]+)[/]?$ {
root /usr/syno/synoman;
rewrite /synofoto/api/v([\d]+)/p/([\w]+)/([\w]+)/([\w]+)[/]?$ /webapi/entry.cgi?api=SYNO.Foto.$2.$3&version=$1&method=$4&$args break;
include scgi_params;
scgi_pass synoscgi;
}
location ~ ^/synofoto/api/v([\d]+)/t/([\w]+)/([\w]+)/([\w]+)[/]?$ {
root /usr/syno/synoman;
rewrite /synofoto/api/v([\d]+)/t/([\w]+)/([\w]+)/([\w]+)[/]?$ /webapi/entry.cgi?api=SYNO.FotoTeam.$2.$3&version=$1&method=$4&$args break;
include scgi_params;
scgi_pass synoscgi;
}
location ~ ^/synofoto/api/v([\d]+)/p/([\w]+)/([\w]+)[/]?$ {
root /usr/syno/synoman;
rewrite /synofoto/api/v([\d]+)/p/([\w]+)/([\w]+)[/]?$ /webapi/entry.cgi?api=SYNO.Foto.$2&version=$1&method=$3&$args break;
limit_req zone=synofotolimit burst=25;
include scgi_params;
scgi_pass synoscgi;
}
location ~ ^/synofoto/api/v([\d]+)/t/([\w]+)/([\w]+)[/]?$ {
root /usr/syno/synoman;
rewrite /synofoto/api/v([\d]+)/t/([\w]+)/([\w]+)[/]?$ /webapi/entry.cgi?api=SYNO.FotoTeam.$2&version=$1&method=$3&$args break;
limit_req zone=synofotolimit burst=25;
include scgi_params;
scgi_pass synoscgi;
}
location ~ ^/volume(?:X|USB|SATA|Gluster)?\d+/ {
internal;
root /;
open_file_cache off;
include conf.d/x-accel.*.conf;
}