qr_ynh/conf/nginx.conf

28 lines
878 B
Nginx Configuration File
Raw Normal View History

2019-08-12 23:55:33 +02:00
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
2019-08-13 21:35:51 +02:00
# Path to source
2022-03-03 17:58:37 +01:00
alias __FINALPATH__/;
2019-08-12 23:55:33 +02:00
2019-08-13 21:35:51 +02:00
index index.php;
2019-08-12 23:55:33 +02:00
# Chrooted PHP-FPM
2022-03-05 16:04:16 +01:00
#sub_path_only location ~ ^__PATH__(?<chroot_path>/.*\.php)$ {
#root_path_only location ~ ^(?<chroot_path>/.*\.php)$ {
alias /;
2022-03-05 16:04:16 +01:00
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
2019-08-13 21:35:51 +02:00
fastcgi_index index.php;
2022-03-05 16:04:16 +01:00
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
2019-08-13 21:35:51 +02:00
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $chroot_path;
2022-03-05 16:04:16 +01:00
include fastcgi_params;
2019-08-13 21:35:51 +02:00
}
2022-03-03 17:58:37 +01:00
# Security related headers
more_set_headers "Referrer-Policy: no-referrer";
more_set_headers "Content-Security-Policy: default-src 'none'; style-src 'self'; img-src 'self' data:; frame-ancestors 'none'; form-action 'self';";
2019-08-13 21:35:51 +02:00
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
2019-08-12 23:55:33 +02:00
}