## Managed by ansible
## vim: noexpandtab tabstop=4
server {
	listen [::]:443 ssl;
	listen 443 ssl;
	ssl_certificate /etc/letsencrypt/live/haskell.fi.muni.cz/fullchain.pem;
	ssl_certificate_key /etc/letsencrypt/live/haskell.fi.muni.cz/privkey.pem;
	include /etc/letsencrypt/options-ssl-nginx.conf;
	ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

	# Note: You should disable gzip for SSL traffic.
	# See: https://bugs.debian.org/773332
	#
	# Read up on ssl_ciphers to ensure a secure configuration.
	# See: https://bugs.debian.org/765782
	#
	# Self signed certs generated by the ssl-cert package
	# Don't use them in a production server!
	#
	# include snippets/snakeoil.conf;

	root /var/empty;

	server_name hoogle.fi.muni.cz;

	location / {
		proxy_pass http://127.0.0.1:8080/;

		location ~ /haddock//*(.*) {
			return 302 $scheme://haskell.fi.muni.cz/doc/$1;
		}
	}
}
