map $http_upgrade $connection_upgrade { default upgrade; "" ""; } # server for: {_VHOST_} # request from: all server { # define listen port listen 443 ssl; listen [::]:443 ssl; # enable http2 http2 on; # switch server tokens off - this does not enhance security, but it makes work harder for an attacker server_tokens off; # include ssl configuration include sites-include/ssl_{_VHOST_}.conf; # server names to match server_name {_VHOST_} ; # define document root root /var/www/offline; # define logging access_log /var/log/nginx/900_{_VHOST_}_ssl.access_log; error_log /var/log/nginx/900_{_VHOST_}_ssl.error_log warn; # define index files - at least one must be defined index index.html; # Disable checking of client request body size client_max_body_size 0; error_page 502 /error_502.html; location = /error_502.html { root /var/www/offline; internal; } location / { proxy_pass http://{_IP_}:{_PORT_}/; include proxy_params; add_header Front-End-Https on; proxy_redirect off; # Websockets proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } }