Files
hetzner/nginx/ai.zidanesyukri.me

40 lines
1.2 KiB
Plaintext

server {
listen 80;
server_name ai.zidanesyukri.me;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name ai.zidanesyukri.me;
ssl_certificate /etc/letsencrypt/live/ai.zidanesyukri.me/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ai.zidanesyukri.me/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
# WebSocket & Connection Upgrades
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Standard Proxy Headers
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;
# Disable Buffering for Real-time AI Streaming
proxy_buffering off;
proxy_cache off;
# Extended Timeouts for Long AI Inferences
proxy_read_timeout 86400;
proxy_send_timeout 86400;
proxy_connect_timeout 300;
}
}