From 18cd39506f3444cdc8eebcaacafbdb2d7d2c2423 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Wed, 13 Sep 2017 17:17:05 +0200 Subject: [PATCH] cleaned spaces in nginx.conf and removed https redirection --- conf/nginx.conf | 71 +++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 38 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 6eda5c8..fe8bcb8 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,46 +1,41 @@ location __PATH__ { - #Source: https://docs.weblate.org/en/latest/admin/install.html#sample-configuration-for-nginx-and-uwsgi - #TODO:https://docs.weblate.org/en/latest/admin/install.html#id2 - # Path to source - alias __FINALPATH__/ ; + #Source: https://docs.weblate.org/en/latest/admin/install.html#sample-configuration-for-nginx-and-uwsgi + # Path to source + alias __FINALPATH__/ ; - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } + location /favicon.ico { + # DATA_DIR/static/favicon.ico + alias __FINALPATH__/static/favicon.ico; + expires 30d; + } - location /favicon.ico { - # DATA_DIR/static/favicon.ico - alias __FINALPATH__/static/favicon.ico; - expires 30d; - } + location /robots.txt { + # DATA_DIR/static/robots.txt + alias __FINALPATH__/static/robots.txt; + expires 30d; + } - location /robots.txt { - # DATA_DIR/static/robots.txt - alias __FINALPATH__/static/robots.txt; - expires 30d; - } + location /static { + # DATA_DIR/static/ + alias __FINALPATH__/static/; + expires 30d; + } - location /static { - # DATA_DIR/static/ - alias __FINALPATH__/static/; - expires 30d; - } + location /media { + # DATA_DIR/media/ + alias __FINALPATH__/media/; + expires 30d; + } - location /media { - # DATA_DIR/media/ - alias __FINALPATH__/media/; - expires 30d; - } + location / { + include uwsgi_params; + # Needed for long running operations in admin interface + uwsgi_read_timeout 3600; + # Adjust based to uwsgi configuration: + uwsgi_pass unix:///run/uwsgi/app/weblate/socket; + # uwsgi_pass 127.0.0.1:8080; + } - location / { - include uwsgi_params; - # Needed for long running operations in admin interface - uwsgi_read_timeout 3600; - # Adjust based to uwsgi configuration: - uwsgi_pass unix:///run/uwsgi/app/weblate/socket; - # uwsgi_pass 127.0.0.1:8080; - } - - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; }