server {
    listen 80;
    server_name stagingadmin.spottorg.ru;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl ;
    server_name stagingadmin.spottorg.ru;

    ssl_certificate /etc/nginx/ssl/spottorg.crt;
    ssl_certificate_key /etc/nginx/ssl/spottorg.key;

    client_max_body_size 10m;

    access_log /var/log/nginx/stagingadmin.spottorg.ru_access.log json;
    error_log /var/log/nginx/stagingadmin.spottorg.ru_error.log;

    location / {
        proxy_pass https://admin:443;
        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;
        chunked_transfer_encoding off;
        proxy_buffering off;
        proxy_cache off;
    }
}
