aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/nginx.conf.j23
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;