Phpfpm: Difference between revisions
imported>Dmo84 added troubleshooting info for locations, if using regular expressions. |
m link added, Category:PHP added |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
php-fpm is a fastcgi interface for php. | [https://www.php.net/manual/en/install.fpm.php php-fpm] is a fastcgi interface for php. | ||
== Configuration for nginx== | == Configuration for nginx== | ||
Line 35: | Line 35: | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass unix:${config.services.phpfpm.pools.${app}.socket}; | fastcgi_pass unix:${config.services.phpfpm.pools.${app}.socket}; | ||
include ${pkgs.nginx}/conf/fastcgi.conf; | include ${pkgs.nginx}/conf/fastcgi.conf; | ||
''; | ''; | ||
Line 58: | Line 57: | ||
Otherwise file names like ''gly'''php'''ro.css'' will be matched and parsed by the php interpreter. Which likely fails with an access error because of php-fpms [https://www.php.net/manual/en/install.fpm.configuration.php security.limit_extensions]. | Otherwise file names like ''gly'''php'''ro.css'' will be matched and parsed by the php interpreter. Which likely fails with an access error because of php-fpms [https://www.php.net/manual/en/install.fpm.configuration.php security.limit_extensions]. | ||
See also [ | See also [[Nginx | the nginx article]]. | ||
== PHP Extensions == | == PHP Extensions == | ||
Line 71: | Line 70: | ||
} | } | ||
</syntaxHighlight> | </syntaxHighlight> | ||
[[Category:PHP]] |