CP_EHRENAMT/deploy/nginx-checkpoint.conf
2026-06-25 18:58:44 +02:00

31 lines
1.1 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# nginx-Serverblock für CheckPoint Ehrenamt (Reverse Proxy vor gunicorn).
# Ablage: /etc/nginx/sites-available/checkpoint → nach sites-enabled verlinken.
# certbot ergänzt den 443-Block + Zertifikate automatisch (siehe DEPLOY.md).
# checkpoint.example.org überall durch die echte Domain ersetzen.
server {
listen 80;
listen [::]:80;
server_name checkpoint.example.org;
# Muss >= MAX_CONTENT_LENGTH der App (10 MB) sein, sonst lehnt nginx Uploads
# vor der App mit 413 ab.
client_max_body_size 12m;
# Statische Dateien (CSS, JS, Schriften) direkt von nginx ausliefern.
# Uploads/Dokumente NICHT hier ausliefern die laufen zugriffsgeschützt
# über die App (instance/uploads ist bewusst nicht öffentlich).
location /static/ {
alias /opt/checkpoint/app/static/;
expires 30d;
access_log off;
}
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $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;
}
}