Skip to content

Commit

Permalink
docs: Fixed example configration to match CACHE_DIR usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Jul 20, 2023
1 parent 019cc8a commit cfcc1ce
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions docs/admin/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
6 changes: 3 additions & 3 deletions weblate/examples/apache-path.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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/
<Directory /home/weblate/data/static/>
Alias /weblate/static/ /home/weblate/data/cache/static/
<Directory /home/weblate/data/cache/static/>
Require all granted
</Directory>

Expand Down
6 changes: 3 additions & 3 deletions weblate/examples/apache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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/
<Directory /home/weblate/data/static/>
Alias /static/ /home/weblate/data/cache/static/
<Directory /home/weblate/data/cache/static/>
Require all granted
</Directory>

Expand Down
6 changes: 3 additions & 3 deletions weblate/examples/apache.gunicorn.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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/
<Directory /home/weblate/data/static/>
Alias /static/ /home/weblate/data/cache/static/
<Directory /home/weblate/data/cache/static/>
Require all granted
</Directory>

Expand Down
4 changes: 2 additions & 2 deletions weblate/examples/weblate.nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit cfcc1ce

Please sign in to comment.