From 933076f8bea7d8ccb3f24a9e44f925179f50ce6c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Fri, 15 Sep 2017 10:58:04 +0200 Subject: [PATCH] added pathurl in settings, and corrected DATA_DIR in nginx --- conf/nginx.conf | 8 ++++---- conf/settings.py | 3 +-- scripts/install | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 1aa4bed..c3c4a1c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -16,24 +16,24 @@ location __PATH__ { location __PATH__/favicon.ico { # DATA_DIR/static/favicon.ico - alias __FINALPATH__/static/favicon.ico; + alias __FINALPATH__/data/static/favicon.ico; expires 30d; } location __PATH__/robots.txt { # DATA_DIR/static/robots.txt - alias __FINALPATH__/static/robots.txt; + alias __FINALPATH__/data/static/robots.txt; expires 30d; } location __PATH__/static { # DATA_DIR/static/ - alias __FINALPATH__/static/; + alias __FINALPATH__/data/static/; expires 30d; } location __PATH__/media { # DATA_DIR/media/ - alias __FINALPATH__/media/; + alias __FINALPATH__/data/media/; expires 30d; } diff --git a/conf/settings.py b/conf/settings.py index 4640a9b..d53c5c4 100644 --- a/conf/settings.py +++ b/conf/settings.py @@ -56,7 +56,6 @@ DATABASES = { # If your server supports it, see Unicode issues above 'charset': 'utf8mb4', } - } } @@ -133,7 +132,7 @@ USE_L10N = True USE_TZ = True # URL prefix to use, please see documentation for more details -URL_PREFIX = '' +URL_PREFIX = '__PATHURL__/' # Absolute filesystem path to the directory that will hold user-uploaded files. # Example: "/home/media/media.lawrence.com/media/" diff --git a/scripts/install b/scripts/install index c83918c..c96fd4e 100755 --- a/scripts/install +++ b/scripts/install @@ -151,6 +151,7 @@ ynh_replace_string "__ADMIN__" "$admin" $final_path/weblate/settings.py ynh_replace_string "__ADMINMAIL__" "$admin_mail" $final_path/weblate/settings.py ynh_replace_string "__DOMAIN__" "$domain" $final_path/weblate/settings.py ynh_replace_string "__KEY__" "$key" $final_path/weblate/settings.py +ynh_replace_string "__PATHURL__" "$pathurl" $final_path/weblate/settings.py #================================================= # PIP INSTALLATION