2024-02-11 23:07:19 +01:00
|
|
|
location __PATH__/ {
|
2021-07-17 16:48:02 +02:00
|
|
|
|
2024-02-11 23:07:19 +01:00
|
|
|
alias __INSTALL_DIR__/;
|
2017-07-21 10:14:27 +02:00
|
|
|
|
2024-02-11 23:07:19 +01:00
|
|
|
if (!-e $request_filename) {
|
|
|
|
rewrite ^(.*)$ /index.php?pagename=$1;
|
|
|
|
}
|
2020-10-15 21:09:24 +02:00
|
|
|
|
2024-02-11 23:07:19 +01:00
|
|
|
#allow uploads up to 20MB in size
|
|
|
|
client_max_body_size 50M;
|
|
|
|
client_body_buffer_size 128k;
|
2018-01-18 23:29:59 +01:00
|
|
|
|
2024-02-11 23:07:19 +01:00
|
|
|
#Default indexes and catch-all
|
|
|
|
index index.php;
|
2020-10-15 21:09:24 +02:00
|
|
|
|
2018-06-05 23:17:03 +02:00
|
|
|
# make sure webfinger and other well known services aren't blocked
|
|
|
|
# by denying dot files and rewrite request to the front controller
|
|
|
|
location ^~ /.well-known/ {
|
|
|
|
allow all;
|
2024-02-11 23:07:19 +01:00
|
|
|
if (!-e $request_filename) {
|
|
|
|
rewrite ^(.*)$ /index.php?pagename=$1;
|
|
|
|
}
|
2018-06-05 23:17:03 +02:00
|
|
|
}
|
2020-10-15 21:09:24 +02:00
|
|
|
|
2018-06-05 23:17:03 +02:00
|
|
|
include mime.types;
|
2018-01-18 23:29:59 +01:00
|
|
|
|
2018-06-05 23:17:03 +02:00
|
|
|
# block these file types
|
|
|
|
location ~* \.(tpl|md|tgz|log|out)$ {
|
|
|
|
deny all;
|
|
|
|
}
|
2018-01-18 23:29:59 +01:00
|
|
|
|
2024-02-11 23:07:19 +01:00
|
|
|
#Execute and serve PHP files
|
|
|
|
location ~* \.php$ {
|
|
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
|
|
try_files $uri =404;
|
|
|
|
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
}
|
2018-01-18 23:29:59 +01:00
|
|
|
|
2018-06-05 23:17:03 +02:00
|
|
|
# deny access to all dot files
|
|
|
|
location ~ /\. {
|
|
|
|
deny all;
|
|
|
|
}
|
2023-08-21 11:53:28 +02:00
|
|
|
|
|
|
|
#Include SSOWAT user panel.
|
|
|
|
include conf.d/yunohost_panel.conf.inc;
|
2018-01-18 23:29:59 +01:00
|
|
|
}
|