Nginx: Difference between revisions
imported>Thanegill m Change to new phpfpm pool option |
imported>Mic92 fix phpfpm syntax. |
||
Line 64: | Line 64: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
{ config, ...}: { | |||
services.nginx = { | services.nginx = { | ||
enable = true; | enable = true; | ||
Line 71: | Line 72: | ||
root = "/var/www/blog"; | root = "/var/www/blog"; | ||
locations."~ \.php$".extraConfig = '' | locations."~ \.php$".extraConfig = '' | ||
fastcgi_pass | fastcgi_pass unix:${config.services.phpfpm.pools.mypool.socket}; | ||
fastcgi_index index.php; | fastcgi_index index.php; | ||
''; | ''; | ||
Line 80: | Line 81: | ||
package = pkgs.mariadb; | package = pkgs.mariadb; | ||
}; | }; | ||
services.phpfpm.pools.mypool = '' | services.phpfpm.pools.mypool.extraConfig = '' | ||
user = nobody | user = nobody | ||
pm = dynamic | pm = dynamic | ||
Line 90: | Line 90: | ||
pm.max_requests = 500 | pm.max_requests = 500 | ||
''; | ''; | ||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||