make php work, i hate it here
This commit is contained in:
parent
2c90c2dcc0
commit
b8db76b404
5 changed files with 38 additions and 24 deletions
|
@ -1,7 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts = {
|
||||
"nixfox.ca" = {
|
||||
services = {
|
||||
# The main nginx domain
|
||||
nginx.virtualHosts."nixfox.ca" = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
|
||||
|
@ -12,6 +13,11 @@
|
|||
error_page 404 /404.html;
|
||||
'';
|
||||
|
||||
"~ \\.php$".extraConfig = ''
|
||||
fastcgi_index index.php;
|
||||
fastcgi_pass unix:${config.services.phpfpm.pools.nginx.socket};
|
||||
'';
|
||||
|
||||
"/.well-known/matrix/client".extraConfig = ''
|
||||
default_type application/json;
|
||||
return 200 '{
|
||||
|
@ -26,5 +32,22 @@
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Enable PHP for some fancy stuff
|
||||
phpfpm.pools.nginx = {
|
||||
user = "nobody";
|
||||
settings = {
|
||||
"pm" = "dynamic";
|
||||
"pm.max_children" = 75;
|
||||
"pm.start_servers" = 10;
|
||||
"pm.min_spare_servers" = 5;
|
||||
"pm.max_spare_servers" = 20;
|
||||
"pm.max_requests" = 500;
|
||||
"listen.owner" = config.services.nginx.user;
|
||||
"listen.group" = config.services.nginx.group;
|
||||
"listen.mode" = "0660";
|
||||
"catch_workers_output" = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue