HEX
Server: Apache/2.4.63 (Unix)
System: Linux Synopilou92 4.4.302+ #72806 SMP Mon Jul 21 23:16:00 CST 2025 x86_64
User: pilou92 (1026)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /volume1/@appstore/SynologyPhotos/etc/synofoto.mustache
location ~ ^{{#alias}}/{{alias}}{{/alias}}/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 ~ ^{{#alias}}/{{alias}}{{/alias}}/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 ~ ^{{#alias}}/{{alias}}{{/alias}}/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;
  {{> /usr/syno/share/nginx/cgi.pass}}
}

location ~ ^{{#alias}}/{{alias}}{{/alias}}/error_page {
  internal;
  root /var/packages/SynologyPhotos/target/etc;
  rewrite (.*) /error_page.html break;
  allow all;
}

location ~ ^{{#alias}}/{{alias}}{{/alias}}/mo/(sharing|request)/(.+)\.cgi {
    root    /usr/syno/synoman;
    rewrite /mo/(?:sharing|request)/(.+) /$1 break;

  {{> /usr/syno/share/nginx/cgi.pass}}
}

location ~ ^{{#alias}}/{{alias}}{{/alias}}/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;

  {{> /usr/syno/share/nginx/cgi.pass}}
}

location ~ ^{{#alias}}/{{alias}}{{/alias}}/mo/(sharing|request)/(.+)$ {
    root    /usr/syno/synoman;
    rewrite /mo/(?:sharing|request)/(.+) /$1 break;
}

{{! personal webapi with four layer api name}}
location ~ ^{{#alias}}/{{alias}}{{/alias}}/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;

  {{> /usr/syno/share/nginx/cgi.pass}}
}

{{! team webapi with four layer api name}}
location ~ ^{{#alias}}/{{alias}}{{/alias}}/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;

  {{> /usr/syno/share/nginx/cgi.pass}}
}

{{! personal webapi with three layer api name}}
location ~ ^{{#alias}}/{{alias}}{{/alias}}/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;

  {{> /usr/syno/share/nginx/cgi.pass}}
}

{{! team webapi with three layer api name}}
location ~ ^{{#alias}}/{{alias}}{{/alias}}/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;

  {{> /usr/syno/share/nginx/cgi.pass}}
}

{{> /usr/syno/share/nginx/X-Accel}}
{{> /usr/syno/share/nginx/cgi}}