aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--domains.yml4
-rw-r--r--templates/nginx.conf.j26
2 files changed, 10 insertions, 0 deletions
diff --git a/domains.yml b/domains.yml
index 0d4c928..ad12623 100644
--- a/domains.yml
+++ b/domains.yml
@@ -30,6 +30,8 @@ domains:
client_body_size: 200M
proxy:
host: "10.10.1.4"
+ keepalive: true
+ timeout: 10s
octoprint2:
name: "octoprint2.dybiec.info"
http_redirect: true
@@ -37,3 +39,5 @@ domains:
client_body_size: 200M
proxy:
host: "10.10.1.5"
+ keepalive: true
+ timeout: 10s
diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2
index b8896b7..9261fa0 100644
--- a/templates/nginx.conf.j2
+++ b/templates/nginx.conf.j2
@@ -38,6 +38,12 @@ server {
{% endif %}
{% if server.proxy is defined %}
+{% if server.proxy.keepalive is defined and server.proxy.keepalive %}
+ proxy_socket_keepalive on;
+{% endif %}
+{% if server.proxy.timeout is defined %}
+ proxy_connect_timeout {{ server.proxy.timeout }};
+{% endif %}
{% if server.proxy.cache is defined and server.proxy.cache %}
proxy_cache cache_{{ short_name }};
proxy_cache_revalidate on;