events {
  worker_connections  4096;  ## Default: 1024
}

http {
	default_type application/octet-stream;
	sendfile     on;
	tcp_nopush   on;
	server_names_hash_bucket_size 128; # this seems to be required for some vhosts

	server {
		listen 80 default_server;
		listen [::]:80 default_server ipv6only=on;

		root /usr/share/nginx/html;
		index index.html index.htm;

		server_name rapier.tres.tl;
		server_name plumber.tres.tl;

		location /append/ {
			proxy_pass http://append:8000/;
			proxy_set_header Host $host;
		}

		location /filters/ {
			proxy_pass http://filters:8000/;
			proxy_set_header Host $host;
		}

		location /github/ {
			proxy_pass http://github:8000/;
			proxy_set_header Host $host;
		}

		location /sessions/ {
			proxy_pass http://sessions:8000/;
			proxy_set_header Host $host;
		}

		location /mailgun/ {
			proxy_pass http://mailgun:8000/;
			proxy_set_header Host $host;
		}

		#location /balanced/ {
		#	proxy_pass http://lb/;
		#	proxy_set_header Host $host;
		#}


		location ~ /\.ht {
			deny all;
		}
	}
}

