mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-12 11:04:02 -06:00
LEMP starting file, just has working nginx so far.
This commit is contained in:
parent
d386d2cde2
commit
4f9cc2cda3
1 changed files with 31 additions and 0 deletions
31
lemp.nix
Normal file
31
lemp.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts."127.0.0.1" = {
|
||||||
|
root = "/var/www/blog";
|
||||||
|
locations."~ \.php$".extraConfig = ''
|
||||||
|
fastcgi_pass unix:${config.services.phpfpm.pools.mypool.socket};
|
||||||
|
fastcgi_index index.php;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.mysql = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.mariadb;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.phpfpm.pools.mypool = {
|
||||||
|
user = "nobody";
|
||||||
|
settings = {
|
||||||
|
pm = "dynamic";
|
||||||
|
"listen.owner" = config.services.nginx.user;
|
||||||
|
"pm.max_children" = 5;
|
||||||
|
"pm.start_servers" = 2;
|
||||||
|
"pm.min_spare_servers" = 1;
|
||||||
|
"pm.max_spare_servers" = 3;
|
||||||
|
"pm.max_requests" = 500;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue