2019-08-24 19:10:34 +02:00
|
|
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
|
|
|
location __PATH__/ {
|
2022-09-03 18:27:29 +02:00
|
|
|
try_files $uri @__NAME__;
|
2019-08-24 19:10:34 +02:00
|
|
|
}
|
2022-03-13 23:43:18 +01:00
|
|
|
|
2019-08-24 19:10:34 +02:00
|
|
|
location __PATH__/protected/ {
|
2022-03-13 23:43:18 +01:00
|
|
|
internal;
|
2022-09-03 00:23:04 +02:00
|
|
|
alias __FINALPATH__/__NAME__/smedia/;
|
2019-08-24 19:10:34 +02:00
|
|
|
}
|
|
|
|
|
2022-03-15 03:28:49 +01:00
|
|
|
location __PATH__/media/ {
|
2022-09-03 00:23:04 +02:00
|
|
|
alias __FINALPATH__/media/;
|
2019-08-24 19:10:34 +02:00
|
|
|
}
|
|
|
|
|
2022-03-15 03:28:49 +01:00
|
|
|
location __PATH__/static/ {
|
2022-09-03 00:23:04 +02:00
|
|
|
alias __FINALPATH__/static/;
|
2019-08-24 19:10:34 +02:00
|
|
|
}
|
|
|
|
|
2022-03-15 03:28:49 +01:00
|
|
|
location __PATH__/assets/ {
|
2022-09-03 00:23:04 +02:00
|
|
|
alias __FINALPATH__/static/;
|
2019-08-24 19:10:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
location @__NAME__ {
|
2022-03-13 23:43:18 +01:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
2022-09-03 00:23:04 +02:00
|
|
|
proxy_pass http://unix:__FINALPATH__/sock;
|
2019-08-24 19:10:34 +02:00
|
|
|
}
|