feat: added template nginx conf for sintonia_webapp

This commit is contained in:
Michael 2025-02-13 13:47:54 +01:00
parent 5b33dc0a90
commit 75c9367c2e
3 changed files with 55 additions and 1 deletions

View File

@ -129,9 +129,12 @@ services:
depends_on:
- legacy
- sintonia-webapp
environment:
- SINTONIA_LARAVEL_PORT=${SINTONIA_LARAVEL_PORT}
volumes:
- libretime_assets:/var/www/html:ro
- libretime_storage:/srv/libretime:ro
- ${SINTONIA_NGINX_CONFIG_FILEPATH:-./nginx-sintonia.conf.template}:/etc/nginx/templates/sintonia.conf.template:ro
- ${NGINX_CONFIG_FILEPATH:-./nginx.conf}:/etc/nginx/conf.d/default.conf:ro
- sintonia_assets:/var/www/sintonia_webapp

View File

@ -0,0 +1,51 @@
server {
listen ${SINTONIA_LARAVEL_PORT};
root /var/www/sintonia_webapp/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass sintonia-webapp:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param SERVER_NAME sitonia;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
# Internal path for serving media files from the API.
location /api/_media {
internal;
# This alias path must match the 'storage.path' configuration field.
alias /srv/libretime;
}
location ~ ^/api/(v2|browser) {
proxy_set_header 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;
proxy_pass http://api:9001;
}
}

View File

@ -47,4 +47,4 @@ server {
# This alias path must match the 'storage.path' configuration field.
alias /srv/libretime;
}
}
}