sintonia/installer/nginx/libretime.conf
Jonas L 5b23852f8d
feat(installer): add the --storage-path flag (#2865)
### Description

Add the `--storage-path` flag to the installer to configure a custom
storage path out of the box.

On existing installation, we check that the 'storage.path' in the
configuration file is the same as the one provided by the installer.
This ensures that we don't update the nginx configuration file with an
invalid storage path.
2024-01-01 14:38:05 +01:00

49 lines
1.1 KiB
Text

server {
listen @@LISTEN_PORT@@;
listen [::]:@@LISTEN_PORT@@;
access_log /var/log/nginx/libretime.access.log;
error_log /var/log/nginx/libretime.error.log;
root @@LEGACY_WEB_ROOT@@/public;
index index.php index.html index.htm;
client_max_body_size 512M;
client_body_timeout 300s;
location ~ \.php$ {
fastcgi_buffers 64 4K;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# try_files $uri =404;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass unix:/run/libretime-legacy.sock;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ ^/api/(v2|browser) {
include proxy_params;
proxy_redirect off;
proxy_pass http://unix:/run/libretime-api.sock;
}
# Internal path for serving media files from the API.
location /api/_media {
internal;
# This alias path must match the 'storage.path' configuration field.
alias @@STORAGE_PATH@@;
}
}