server {
    listen 80;
    server_name gmlb.smpworld.ru;
    return 301 https://$host$request_uri; # Перенаправление на HTTPS
}

server {
    listen 443 ssl;
    server_name gmlb.smpworld.ru;

    ssl_certificate /etc/letsencrypt/live/gmlb.smpworld.ru/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/gmlb.smpworld.ru/privkey.pem;

    location / {
        proxy_pass http://192.168.88.10:5000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}
