server {
	listen 80;
	server_name {{ server_name }};

	location /.well-known/acme-challenge {
		default_type "text/plain";
		root /tmp/letsencrypt;
	}
	location / {
		return 301 https://$host$request_uri;
	}
}

server {
	listen 443 ssl;
	server_name {{ server_name }};
	root /var/www/msmonitor;

	access_log /var/log/nginx/access_msmonitor.log;
	error_log /var/log/nginx/error_msmonitor.log;

	location /media {
	}
	location /static {
	}
	location /robots {
	}
	location /wowza-manager/ {
		proxy_pass http://localhost:8088/;
		proxy_set_header X-Forwarded-Host $host;
		proxy_set_header X-Forwarded-Server $host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_cookie_path / /wowza-manager/;
	}
	location / {
		uwsgi_pass unix:///home/msmonitor/msmonitor/temporary/uwsgi.sock;
		include /etc/nginx/uwsgi_params;
	}
}
