diff --git a/docs/admin/install.rst b/docs/admin/install.rst index 4a26d0570bf8..f71ed14af753 100644 --- a/docs/admin/install.rst +++ b/docs/admin/install.rst @@ -1215,14 +1215,14 @@ Serving static files Django needs to collect its static files in a single directory. To do so, execute :samp:`weblate collectstatic --noinput`. This will copy the static files into a directory specified by the :setting:`django:STATIC_ROOT` setting (this defaults to -a ``static`` directory inside :setting:`DATA_DIR`). +a ``static`` directory inside :setting:`CACHE_DIR`). It is recommended to serve static files directly from your web server, you should use that for the following paths: :file:`/static/` Serves static files for Weblate and the admin interface - (from defined by ``STATIC_ROOT``). + (from defined by :setting:`django:STATIC_ROOT`). :file:`/media/` Used for user media uploads (e.g. screenshots). :file:`/favicon.ico` diff --git a/weblate/examples/apache-path.conf b/weblate/examples/apache-path.conf index 93ec9043537c..4b1de3a7cc64 100644 --- a/weblate/examples/apache-path.conf +++ b/weblate/examples/apache-path.conf @@ -18,11 +18,11 @@ ServerName weblate.example.org # DATA_DIR/static/favicon.ico - Alias /weblate/favicon.ico /home/weblate/data/static/favicon.ico + Alias /weblate/favicon.ico /home/weblate/data/cache/static/favicon.ico # DATA_DIR/static/ - Alias /weblate/static/ /home/weblate/data/static/ - + Alias /weblate/static/ /home/weblate/data/cache/static/ + Require all granted diff --git a/weblate/examples/apache.conf b/weblate/examples/apache.conf index de59024c081e..11383454f418 100644 --- a/weblate/examples/apache.conf +++ b/weblate/examples/apache.conf @@ -14,11 +14,11 @@ ServerName weblate.example.org # DATA_DIR/static/favicon.ico - Alias /favicon.ico /home/weblate/data/static/favicon.ico + Alias /favicon.ico /home/weblate/data/cache/static/favicon.ico # DATA_DIR/static/ - Alias /static/ /home/weblate/data/static/ - + Alias /static/ /home/weblate/data/cache/static/ + Require all granted diff --git a/weblate/examples/apache.gunicorn.conf b/weblate/examples/apache.gunicorn.conf index 2c5f04611e60..b2157b3a479a 100644 --- a/weblate/examples/apache.gunicorn.conf +++ b/weblate/examples/apache.gunicorn.conf @@ -13,11 +13,11 @@ ServerName weblate.example.org # DATA_DIR/static/favicon.ico - Alias /favicon.ico /home/weblate/data/static/favicon.ico + Alias /favicon.ico /home/weblate/data/cache/static/favicon.ico # DATA_DIR/static/ - Alias /static/ /home/weblate/data/static/ - + Alias /static/ /home/weblate/data/cache/static/ + Require all granted diff --git a/weblate/examples/weblate.nginx.conf b/weblate/examples/weblate.nginx.conf index 5271311a7f67..23f58505794b 100644 --- a/weblate/examples/weblate.nginx.conf +++ b/weblate/examples/weblate.nginx.conf @@ -17,13 +17,13 @@ server { location ~ ^/favicon.ico$ { # DATA_DIR/static/favicon.ico - alias /home/weblate/data/static/favicon.ico; + alias /home/weblate/data/cache/static/favicon.ico; expires 30d; } location /static/ { # DATA_DIR/static/ - alias /home/weblate/data/static/; + alias /home/weblate/data/cache/static/; expires 30d; }