From f88646060d0356c8b8945e68a4e40b83b045f474 Mon Sep 17 00:00:00 2001 From: anmol Date: Sun, 11 Nov 2018 06:57:58 +0530 Subject: [PATCH] Fix nginx --- conf/nginx.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 4ed2704..3d0d3e1 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,10 +1,14 @@ location ~* \.(jpg|jpeg|png|gif|ico|js|pdf)$ { - root __FINALPATH__/__APP__ + root __FINALPATH__/__NAME__ add_header Cache-Control "public"; expires 7d; } location / { + # Force usage of https + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } proxy_pass http://localhost:__PORT__/; proxy_set_header Host $http_host;