server {
    listen 80;
    server_name gitlab.eatsun.com.cn;

    include /etc/nginx/snippets/letsencrypt.conf;

    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl;
    server_name gitlab.eatsun.com.cn;

    ssl_certificate /etc/letsencrypt/live/gitlab.eatsun.com.cn/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/gitlab.eatsun.com.cn/privkey.pem;

    include /etc/nginx/snippets/ssl-params.conf;

    location / {
        include /etc/nginx/snippets/websocket.conf;
        
        client_max_body_size 0;
        proxy_connect_timeout 300;
        proxy_redirect off;
        
        proxy_set_header X-Forwarded-Ssl on;
        
        proxy_pass http://172.18.188.199:18443;
    }
}
