qr_ynh/conf/nginx.conf

27 lines
766 B
Nginx Configuration File
Raw Permalink Normal View History

2019-08-12 23:55:33 +02:00
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
2023-07-08 22:28:20 +02:00
# Path to source
alias __INSTALL_DIR__/;
2019-08-12 23:55:33 +02:00
2023-07-08 22:28:20 +02:00
index index.php;
2019-08-12 23:55:33 +02:00
2023-07-08 22:28:20 +02:00
# Chrooted PHP-FPM
location __PATH__/index.php {
2023-07-08 22:28:20 +02:00
alias /;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME /index.php;
2023-07-08 22:28:20 +02:00
include fastcgi_params;
}
2022-03-03 17:58:37 +01:00
2023-07-08 22:28:20 +02: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
2023-07-08 22:28:20 +02:00
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
2019-08-12 23:55:33 +02:00
}