Phpfpm: Difference between revisions
imported>Sikmir No edit summary |
imported>Dmo84 added troubleshooting info for locations, if using regular expressions. |
||
Line 49: | Line 49: | ||
} | } | ||
</syntaxHighlight> | </syntaxHighlight> | ||
=== Escaping special chars === | |||
When using regular expressions in <code>locations</code> blocks, be ware of the [https://nixos.org/manual/nix/stable/language/values.html#type-string need to escape some special chars] like <code>\</code>. | |||
i.e. <code>locations."~ ^(.+\.php)(.*)$" = {</code> should be escaped to <code>locations."~ ^(.+\\.php)(.*)$" = {</code> | |||
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 [https://nixos.wiki/wiki/Nginx NixOS Wiki nginx]. | |||
== PHP Extensions == | == PHP Extensions == |