dataset/seed/nginx-https/templates/risotto.conf

31 lines
1.1 KiB
Text
Raw Normal View History

2022-05-04 10:29:03 +02:00
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains;';
add_header Referrer-Policy no-referrer always;
2022-04-28 21:48:16 +02:00
%for %%location in %%nginx_locations
2022-05-04 10:29:03 +02:00
location %%location {
2022-04-28 21:48:16 +02:00
%if %%location == '/'
2022-05-04 10:29:03 +02:00
root %slurp
2022-04-28 21:48:16 +02:00
%else
2022-05-04 10:29:03 +02:00
alias %slurp
2022-04-28 21:48:16 +02:00
%end if
%%nginx_root_directory;
%if not %%getVar('php_fpm_installed', False)
2022-05-04 10:29:03 +02:00
index index.html;
2022-04-28 21:48:16 +02:00
%else
2022-05-04 10:29:03 +02:00
index index.php;
location ~ ^(?<script_name>.+?\.php)(?<path_info>/.*)?$ {
fastcgi_pass php-fpm;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
2022-04-28 21:48:16 +02:00
}
2022-05-04 10:29:03 +02:00
%end if
2022-04-28 21:48:16 +02:00
}
2022-05-04 10:29:03 +02:00
%end for