diff options
author | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2019-04-24 17:56:46 +0200 |
---|---|---|
committer | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2019-04-24 17:56:46 +0200 |
commit | cfe769e793ad5760a0fb50fb891c40174990d03e (patch) | |
tree | 60e704d768f9840f33c03ef63e148a640bf82c72 | |
parent | Add config for websockets (diff) |
Fix nginx template formatting
-rw-r--r-- | templates/nginx.conf.j2 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index f12b11c..a72c6cc 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -7,18 +7,18 @@ server { {% endif %} server { - {% if server.http_redirect is not defined or not server.http_redirect %} +{% if server.http_redirect is not defined or not server.http_redirect %} listen 80; - {% endif %} +{% endif %} listen 443 ssl; server_name {{ server.name }}; location / { - {% if server.dir is defined %} +{% if server.dir is defined %} root {{ server.dir }}; index index.html; - {% endif %} - {% if server.proxy is defined %} +{% endif %} +{% if server.proxy is defined %} proxy_pass http://{{server.proxy.host|default("localhost")}}:{{server.proxy.port|default("80")}}; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -30,7 +30,7 @@ server { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; {% endif %} - {% endif %} +{% endif %} } } |