59 lines
1.6 KiB
Plaintext
59 lines
1.6 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name garde-studios.de www.garde-studios.de;
|
|
|
|
charset utf-8;
|
|
charset_types text/html text/css application/javascript text/plain text/xml;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name garde-studios.de www.garde-studios.de;
|
|
|
|
charset utf-8;
|
|
charset_types text/html text/css application/javascript text/plain text/xml;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/garde-studios.de/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/garde-studios.de/privkey.pem;
|
|
|
|
# SSL configuration
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_prefer_server_ciphers on;
|
|
ssl_ciphers EECDH+AESGCM:EDH+AESGCM;
|
|
ssl_ecdh_curve secp384r1;
|
|
ssl_session_timeout 10m;
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_session_tickets off;
|
|
ssl_stapling on;
|
|
ssl_stapling_verify on;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# API reverse proxy
|
|
location /api/ {
|
|
proxy_pass http://port-checker: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;
|
|
|
|
# WebSocket support (if needed in future)
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
# Frontend static files
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|