Redirect http to https
authorLorin Hochstein <lhochstein@netflix.com>
Tue, 7 Feb 2017 05:10:01 +0000 (21:10 -0800)
committerLorin Hochstein <lhochstein@netflix.com>
Tue, 7 Feb 2017 05:10:01 +0000 (21:10 -0800)
ch13/nginx/ghost.conf

index e3cf4b5..25b200e 100644 (file)
@@ -3,8 +3,11 @@ upstream ghost {
 }
 
 server {
-
     listen 80;
+    return 301 https://$host$request_uri;
+}
+
+server {
 
     listen 443 ssl;