
upstream eshost
{
        server 10.242.53.189:9200;
        keepalive 200;
}
server {
    server_name  es.sailforce.online;
    root         /var/www/html;

    client_max_body_size 200m;
    # Load configuration files for the default server block.
    location / {
       proxy_pass   https://grok.com;
       proxy_connect_timeout 6000s;
       proxy_read_timeout 3600s;
       proxy_send_timeout 6000s;
       proxy_set_header   X-Real-IP        $remote_addr;
       proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
       proxy_set_header  X-Forwarded-Proto https;
       proxy_set_header  X-Forwarded-Port $server_port;
       proxy_buffer_size 64k;
       proxy_buffers 4 32k;
       proxy_busy_buffers_size 64k;
       proxy_temp_file_write_size 64k;
    }
    
    
    error_page 404 /404.html;
        location = /40x.html {
    }

    error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }





    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/es.sailforce.online/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/es.sailforce.online/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

server {
    if ($host = es.sailforce.online) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    server_name  es.sailforce.online;


    listen 80;
    return 404; # managed by Certbot


}
