# HTTPS server

server {
	listen 443;
	auth_basic "Enter password for your job.";
	auth_basic_user_file /opt/h2oai/htpasswd;

	root html;
	index index.html index.htm;

	ssl on;
	ssl_certificate /opt/h2oai/cert.pem;
	ssl_certificate_key /opt/h2oai/cert.pem;

	ssl_session_timeout 5m;

	ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
	ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
	ssl_prefer_server_ciphers on;

        # Proxy calls to a locally running IPython server
	location / {
	 	proxy_pass http://localhost:8888;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection "upgrade";
		proxy_set_header Origin "";
	}
}
