new nginx config directory

This commit is contained in:
vabene1111
2025-07-29 16:01:32 +02:00
parent 3103f28fc8
commit 92578dd6a2
3 changed files with 53 additions and 2 deletions

31
http.d/Recipes.conf Normal file
View File

@@ -0,0 +1,31 @@
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name localhost;
client_max_body_size 128M;
# serve media files
location /media {
alias /opt/recipes/mediafiles;
add_header Content-Disposition 'attachment; filename="$args"';
}
# serve service worker under main path
location = /service-worker.js {
alias /opt/recipes/staticfiles/vue3/service-worker.js;
}
# pass requests for dynamic content to gunicorn
location / {
proxy_set_header Host $http_host;
proxy_pass http://web_recipes:8080;
error_page 502 /errors/http502.html;
}
location /errors/ {
alias /etc/nginx/conf.d/errorpages/;
internal;
}
}