mirror of
https://github.com/YunoHost-Apps/bookwyrm_ynh.git
synced 2024-09-03 18:16:12 +02:00
Update nginx v0.7.2
This commit is contained in:
parent
fcecbf5437
commit
dcb385da82
1 changed files with 15 additions and 1 deletions
|
@ -1,12 +1,26 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__/;
|
proxy_pass http://127.0.0.1:__PORT__/;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# directly serve images and static files from the
|
||||||
|
# bookwyrm filesystem using sendfile.
|
||||||
|
# make the logs quieter by not reporting these requests
|
||||||
|
location ~ \.(bmp|ico|jpg|jpeg|png|tif|tiff|webp|css|js)$ {
|
||||||
|
root __INSTALL_DIR__;
|
||||||
|
try_files $uri =404;
|
||||||
|
add_header X-Cache-Status STATIC;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
# block access to any non-image files from images or static
|
||||||
|
location ~ ^/images/ {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
|
||||||
location /images/ {
|
location /images/ {
|
||||||
alias __INSTALL_DIR__/images/;
|
alias __INSTALL_DIR__/images/;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue