1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bozon_ynh.git synced 2024-09-03 18:16:09 +02:00
bozon_ynh/conf/nginx.conf

65 lines
1.7 KiB
Nginx Configuration File
Raw Normal View History

2019-11-18 12:30:42 +01:00
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
2022-07-28 03:39:57 +02:00
# Path to source
alias __FINALPATH__/;
2022-08-01 02:15:16 +02:00
index index.php;
2022-07-28 03:39:57 +02:00
# Add headers to serve security related headers
more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;";
more_set_headers "X-Content-Type-Options: nosniff";
more_set_headers "X-XSS-Protection: 1; mode=block";
more_set_headers "X-Robots-Tag: none";
more_set_headers "X-Download-Options: noopen";
more_set_headers "X-Permitted-Cross-Domain-Policies: none";
more_set_headers "Referrer-Policy: no-referrer";
# Set max upload size
client_max_body_size 10G;
fastcgi_buffers 64 4K;
client_body_timeout 60m;
proxy_read_timeout 60m;
# Disable gzip to avoid the removal of the ETag header
gzip off;
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;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true;
fastcgi_intercept_errors on;
fastcgi_read_timeout 60m;
fastcgi_send_timeout 60m;
2022-08-01 02:15:16 +02:00
}
2022-07-28 03:39:57 +02:00
location ^~ __PATH__/(uploads|thumbs){
deny all;
2022-08-01 02:15:16 +02:00
}
2022-07-28 03:39:57 +02:00
location ^~ __PATH__/private {
deny all;
location ~* __PATH__/private/temp/.*\.zip$ {
allow all;
}
}
location ^~ __PATH__/core {
deny all;
location ~* __PATH__/core/.*\.js$ {
allow all;
}
}
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
2019-11-18 12:30:42 +01:00
}