Redirect http to https with Nginx

Posted on 22-11-2017 by Nadir Latif


Source: https://bjornjohansen.no/redirect-to-https-with-nginx

To redirect http urls to https with Nginx web server, we need to add following inside a server block or location block: return 301 https://$host$request_uri;