2023-11-20 23:01:30 +01:00
|
|
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
|
|
|
location __PATH__/ {
|
|
|
|
|
|
|
|
# Path to source
|
|
|
|
alias __INSTALL_DIR__/public/;
|
|
|
|
|
|
|
|
index index.php index.html index.htm;
|
|
|
|
|
|
|
|
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
|
|
|
client_max_body_size 50M;
|
|
|
|
|
|
|
|
try_files $uri $uri/ /index.php;
|
|
|
|
|
|
|
|
location ~ [^/]\.php(/|$) {
|
|
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
|
|
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
|
|
|
|
|
|
|
fastcgi_index index.php;
|
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_param REMOTE_USER $remote_user;
|
|
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~* ^/storage/attachment/ {
|
|
|
|
expires 1M;
|
|
|
|
access_log off;
|
|
|
|
try_files $uri $uri/ /index.php;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~* ^/(?:css|js)/.*\.(?:css|js)$ {
|
|
|
|
expires 2d;
|
|
|
|
access_log off;
|
2023-11-20 23:17:59 +01:00
|
|
|
more_set_headers "Cache-Control: public, must-revalidate";
|
2023-11-20 23:01:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# The list should be in sync with /storage/app/public/uploads/.htaccess and /config/app.php
|
|
|
|
location ~* ^/storage/.*\.((?!(jpg|jpeg|jfif|pjpeg|pjp|apng|bmp|gif|ico|cur|png|tif|tiff|webp|pdf|txt|diff|patch|json|mp3|wav|ogg|wma)).)*$ {
|
|
|
|
more_set_headers "Content-disposition: attachment; filename=$2";
|
|
|
|
default_type application/octet-stream;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~* ^/(?:css|fonts|img|installer|js|modules|[^\\\]+\..*)$ {
|
|
|
|
expires 1M;
|
|
|
|
access_log off;
|
|
|
|
more_set_headers "Cache-Control: public";
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ /\. {
|
|
|
|
deny all;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Include SSOWAT user panel.
|
|
|
|
include conf.d/yunohost_panel.conf.inc;
|
|
|
|
}
|