mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
33 lines
757 B
Plaintext
33 lines
757 B
Plaintext
server {
|
|
listen 80;
|
|
listen [::]:80 ipv6only=on;
|
|
server_name localhost;
|
|
|
|
client_max_body_size 128M;
|
|
|
|
# serve media files
|
|
location /media {
|
|
alias ${MEDIA_ROOT};
|
|
add_header Content-Disposition 'attachment; filename="$args"';
|
|
}
|
|
|
|
# serve service worker under main path
|
|
location = /service-worker.js {
|
|
alias ${STATIC_ROOT}/vue3/service-worker.js;
|
|
}
|
|
|
|
# pass requests for dynamic content to gunicorn
|
|
location / {
|
|
proxy_set_header Host $http_host;
|
|
proxy_pass http://localhost:${TANDOOR_PORT};
|
|
|
|
# disabled for now because it redirects to the error page and not back, also not showing html
|
|
#error_page 502 /errors/http502.html;
|
|
}
|
|
|
|
location /errors/ {
|
|
alias /etc/nginx/http.d/errorpages/;
|
|
internal;
|
|
}
|
|
}
|