From 17b45f8310ead224fecfacddd5bac5cf6de97fdb Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Tue, 22 Dec 2020 18:52:00 +0100 Subject: [PATCH] code cleanup --- conf/nginx.conf | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index af9d9e4..65adebf 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,8 +1,8 @@ location __PATH__/static/ { - # Django static files - alias __PUBLIC_PATH__/static/; - expires 30d; + # Django static files + alias __PUBLIC_PATH__/static/; + expires 30d; } # TODO: django-sendfile2: @@ -12,26 +12,23 @@ location __PATH__/static/ { # expires 30d; #} -location __PATH__/ { - # https://github.com/benoitc/gunicorn/blob/master/examples/nginx.conf +location / { + # https://github.com/benoitc/gunicorn/blob/master/examples/nginx.conf - # this is needed if you have file import via upload enabled - client_max_body_size 100M; + # this is needed if you have file import via upload enabled + client_max_body_size 100M; - proxy_http_version 1.1; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Protocol $scheme; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Scheme $scheme; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Protocol $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; - proxy_read_timeout 30; - proxy_send_timeout 30; - proxy_connect_timeout 30; - proxy_redirect off; + proxy_read_timeout 30; + proxy_send_timeout 30; + proxy_connect_timeout 30; + proxy_redirect off; - proxy_pass http://127.0.0.1:__PORT__/; - - # Include SSOWAT user panel. - #include conf.d/yunohost_panel.conf.inc; + proxy_pass http://127.0.0.1:__PORT__/; }