server {
		listen 80;
		listen [::]:80;

		server_name benchcoach-dev.ascorrea.com;
		server_tokens off;

		location /.well-known/acme-challenge/ {
				root /var/www/certbot;
		}

		location / {
				return 301 https://benchcoach-dev.ascorrea.com$request_uri;
		}
}

server {
		listen 443 default_server ssl http2;
		listen [::]:443 ssl http2;

		server_name benchcoach-dev.ascorrea.com;

		ssl_certificate /etc/nginx/ssl/live/benchcoach-dev.ascorrea.com/fullchain.pem;
		ssl_certificate_key /etc/nginx/ssl/live/benchcoach-dev.ascorrea.com/privkey.pem;
		
		location / {
			proxy_set_header Host $http_host;
			proxy_set_header Client-IP $remote_addr;
			proxy_set_header X-Real-IP  $remote_addr;
			proxy_set_header X-Forwarded-For $remote_addr;
			proxy_set_header X-Forwarded-Proto $scheme;
			proxy_pass http://app:3000/; 
		}
}
