home-server/roles/dmz_nginx/templates/php-fast.inc.j2

18 lines
791 B
Django/Jinja
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# The home-server project produces a multi-purpose setup using Ansible.
# Copyright © 20182023 Y. Gablin, under the GPL-3.0-or-later license.
# Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing.
# http://wiki.nginx.org/Pitfalls#Passing_Uncontrolled_Requests_to_PHP
location ~ \.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)?$;
fastcgi_pass unix:/run/shared_sockets/php-fpm;
fastcgi_index index.php;
fastcgi_send_timeout 60m;
fastcgi_read_timeout 60m;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param HTTPS $proxy_https if_not_empty;
fastcgi_param REQUEST_SCHEME $proxy_https if_not_empty;
fastcgi_param SERVER_PORT $proxy_port if_not_empty;
}