Skip to content

Commit 6df8a57

Browse files
committed
added cache entry to localhost.conf, reordered location blocks
1 parent a10993c commit 6df8a57

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

etc/nginx/localhost.conf

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ server {
2323
return $scheme://$host:8080/$lang_accept;
2424
}
2525

26+
27+
location /static {
28+
alias /var/services/django/static;
29+
access_log off;
30+
}
31+
32+
location /cache {
33+
alias /var/services/django/media/cache;
34+
}
35+
36+
location /media {
37+
alias /var/services/django/media;
38+
}
39+
2640
location ~* "^/([0-9a-z]{6})/?$" {
2741
set $lang_sup "de,fr";
2842
set_by_lua_file $lang_accept /etc/nginx/conf.d/lang.lua $lang_sup;
@@ -39,20 +53,11 @@ server {
3953
}
4054
}
4155

42-
location /static {
43-
alias /var/services/django/static;
44-
access_log off;
45-
}
46-
4756
location ~ ^/downloads/snapshot-screenshots/(?<file_name>.*) {
4857
add_header Content-Disposition 'attachment; filename="$file_name"';
4958
root /var/services/django;
5059
}
5160

52-
location /media {
53-
alias /var/services/django/media;
54-
}
55-
5661
location ~ "^/(de|fr)/(?<hash>[0-9A-Z]{6})/?$" {
5762
# dev proxy vue
5863
include "/etc/nginx/conf.d/proxy_conf.inc";

0 commit comments

Comments
 (0)