diff options
author | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2019-05-23 22:01:32 +0200 |
---|---|---|
committer | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2019-05-23 22:01:32 +0200 |
commit | 8b46ea3618b100fc873fc694721afa53319d17d0 (patch) | |
tree | 51e7ed87c2b647e88b2b509051353c1bbcecdded | |
parent | Force https on main domain (diff) |
Formatting
-rw-r--r-- | templates/nginx.conf.j2 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 724bf32..be3203d 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -7,6 +7,7 @@ server { {% endif %} server { + {% if server.http_redirect is not defined or not server.http_redirect %} listen 80; {% endif %} @@ -14,10 +15,12 @@ server { server_name {{ server.name }}; location / { + {% if server.dir is defined %} root {{ server.dir }}; index index.html; {% 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; |