Nginx - Redirect to https

Categories: Webserver

Insert this code into your Nginx server {} block

server {
	listen 80;
	server_name YOURDOMAIN.com;
	return 301 https://$host$request_uri;
}