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..f69adb5 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__" "$path_url" $final_path/weblate/settings.py #================================================= # PIP INSTALLATION