This commit is contained in:
krizej 2024-08-21 21:00:08 +02:00
parent 3171184c74
commit 747b249238

View file

@ -43,32 +43,59 @@
services.nginx = { services.nginx = {
enable = true; enable = true;
additionalModules = [ pkgs.nginxModules.fancyindex ]; additionalModules = [ pkgs.nginxModules.fancyindex ];
virtualHosts.media = { virtualHosts = {
default = true; # media = {
# addSSL = true; # default = true;
# enableACME = true; # # addSSL = true;
# # enableACME = true;
root = "/media"; # root = "/media";
# serverName = "_";
serverName = "_"; # locations = {
# "/" = {
locations = { # tryFiles = "$uri $uri/ =404";
"/" = { # extraConfig = ''
tryFiles = "$uri $uri/ =404"; # fancyindex on;
extraConfig = '' # fancyindex_name_length 256;
fancyindex on; # fancyindex_exact_size off;
fancyindex_name_length 256; # '';
fancyindex_exact_size off; # };
''; # };
}; # };
stronnica = {
default = true;
# addSSL = true;
enableACME = true;
root = "/srv/http/stronnica";
locations."~ \\.php$".extraConfig = ''
fastcgi_pass unix:${config.services.phpfpm.pools.mypool.socket};
fastcgi_index index.php;
'';
}; };
}; };
}; };
# security.acme = { services.mysql = {
# acceptTerms = true; enable = true;
# defaults.email = "krizej@protonmail.com"; 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;
};
};
security.acme = {
acceptTerms = true;
defaults.email = "krizej@protonmail.com";
};
chuj = { chuj = {
system = { system = {