<commit_before>#---------------------------------------------------------------------
#
# Danube Cloud
#
#---------------------------------------------------------------------

#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
	log		127.0.0.1 local2 
	chroot	/var/lib/haproxy
	pidfile	/var/run/haproxy.pid
	maxconn	30000
	user	haproxy
	group	haproxy
	daemon
	ca-base /etc/ssl/certs
	crt-base /etc/ssl/certs
	stats socket /var/lib/haproxy/stats
	tune.ssl.default-dh-param 2048
	ssl-default-bind-options no-sslv3 no-tls-tickets
	ssl-default-bind-ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH

#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will 
# use if not designated in their block
#---------------------------------------------------------------------
defaults
	mode	http
	log		global
	option	dontlognull
	option	httplog
	option	forwardfor
	option	redispatch
	option	http-server-close 
	maxconn	3000
	retries	3
	timeout connect	5s
	timeout client	60s
	timeout server	60s
	timeout tunnel	1h

#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend main
	bind *:80
	bind *:443 ssl crt /etc/pki/tls/certs/server.pem
	redirect scheme https if !{ ssl_fc }
	rate-limit sessions 30

	acl url_static		path_beg -i /static /favicon.ico /robots.txt /humans.txt /maintenance.html
	acl url_guacamole	path_beg -i /guacamole/tunnel /guacamole/websocket-tunnel
	acl url_api			path_beg -i /api
	acl url_sio			path_beg -i /socket.io
	acl ip_allowed		src 127.0.0.1 ::1

	monitor-uri		/zbx_ping

	# Maintenance mode
	#redirect location /maintenance.html code 302		if !ip_allowed !url_static

	use_backend nginx			if url_static
	use_backend tomcat			if url_guacamole
	use_backend gunicorn-api	if url_api
  	use_backend gunicorn-sio	if url_sio

	default_backend gunicorn-gui
   
#---------------------------------------------------------------------
# static backend for serving up images, stylesheets and such<commit_msg>Enabled letsencrpyt's .well-known path to pass through HAProxy via HTTP<commit_after>#---------------------------------------------------------------------
#
# Danube Cloud
#
#---------------------------------------------------------------------

#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
	log		127.0.0.1 local2 
	chroot	/var/lib/haproxy
	pidfile	/var/run/haproxy.pid
	maxconn	30000
	user	haproxy
	group	haproxy
	daemon
	ca-base /etc/ssl/certs
	crt-base /etc/ssl/certs
	stats socket /var/lib/haproxy/stats
	tune.ssl.default-dh-param 2048
	ssl-default-bind-options no-sslv3 no-tls-tickets
	ssl-default-bind-ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH

#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will 
# use if not designated in their block
#---------------------------------------------------------------------
defaults
	mode	http
	log		global
	option	dontlognull
	option	httplog
	option	forwardfor
	option	redispatch
	option	http-server-close 
	maxconn	3000
	retries	3
	timeout connect	5s
	timeout client	60s
	timeout server	60s
	timeout tunnel	1h

#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend main
	bind *:80
	bind *:443 ssl crt /etc/pki/tls/certs/server.pem
	rate-limit sessions 30

	acl url_static		path_beg -i /static /favicon.ico /robots.txt /humans.txt /maintenance.html
	acl url_guacamole	path_beg -i /guacamole/tunnel /guacamole/websocket-tunnel
	acl url_api			path_beg -i /api
	acl url_sio			path_beg -i /socket.io
	acl ip_allowed		src 127.0.0.1 ::1
	acl url_well_known  path_beg -i /.well-known

	redirect scheme https if !{ ssl_fc } !url_well_known

	monitor-uri		/zbx_ping

	# Maintenance mode
	#redirect location /maintenance.html code 302		if !ip_allowed !url_static

	use_backend nginx			if url_static
	use_backend nginx			if url_well_known
	use_backend tomcat			if url_guacamole
	use_backend gunicorn-api	if url_api
  	use_backend gunicorn-sio	if url_sio

	default_backend gunicorn-gui
   
#---------------------------------------------------------------------
# static backend for serving up images, stylesheets and such
{'fraction_non_alphanumeric': 0.3189212328767123, 'fraction_numerical': 0.02183219178082192, 'mean_word_length': 1.3866189989785496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1078985', 'n_tokens_mistral': 1502, 'n_tokens_neox': 1381, 'n_words': 368}