server {
  listen              80;
  listen              443 ssl;
  server_name         HOSTNAME;
  ssl_certificate     /etc/ssl/self-signed.crt;
  ssl_certificate_key /etc/ssl/self-signed.key;

  location / {
    {% if hello %}
    default_type text/plain;
    expires -1;
    return 200 'Server address: $server_addr:$server_port\nServer name: $hostname\nDate: $time_local\nURI: $request_uri\nRequest ID: $request_id\n';
    {% else %}
    root   /usr/share/nginx/html;
    index  index.html index.htm;
    {% endif %}
  }

  error_page   500 502 503 504  /50x.html;

  location = /50x.html {
    root   /usr/share/nginx/html;
  }
}