X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fleila%2Fproduction.nix;h=3b289cfc8b1591996c62bba906daad35a3caba74;hb=5400b9b6f65451d41a9106fae6fc00f97d83f4ef;hp=52cf8cf1476f3f28bbaf7162b530ffde784cfca3;hpb=29f8cb850d74b456d6481a456311bbf5361d328c;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/leila/production.nix b/modules/private/websites/leila/production.nix index 52cf8cf..3b289cf 100644 --- a/modules/private/websites/leila/production.nix +++ b/modules/private/websites/leila/production.nix @@ -3,26 +3,28 @@ let cfg = config.myServices.websites.leila.production; varDir = "/var/lib/ftp/leila"; in { - options.myServices.websites.leila.production.enable = lib.mkEnableOption "enable Leila's website in production"; + options.myServices.websites.leila.production.enable = lib.mkEnableOption "enable Leila's websites in production"; config = lib.mkIf cfg.enable { - services.phpfpm.poolConfigs.leila = '' - listen = /run/phpfpm/leila.sock - user = wwwrun - group = wwwrun - listen.owner = wwwrun - listen.group = wwwrun + services.phpfpm.pools.leila = { + user = "wwwrun"; + group = "wwwrun"; + settings = { + "listen.owner" = "wwwrun"; + "listen.group" = "wwwrun"; - pm = ondemand - pm.max_children = 5 - pm.process_idle_timeout = 60 + "pm" = "ondemand"; + "pm.max_children" = "5"; + "pm.process_idle_timeout" = "60"; - php_admin_value[open_basedir] = "${varDir}:/tmp" - ''; + "php_admin_value[open_basedir]" = "${varDir}:/tmp"; + }; + }; services.webstats.sites = [ { name = "leila.bouya.org"; } { name = "chorale.leila.bouya.org"; } + { name = "syrwennecreation.bouya.org"; } ]; services.websites.env.production.modules = [ "proxy_fcgi" ]; @@ -43,7 +45,27 @@ in { Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu - SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost" + SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost" + + + '' + ]; + }; + services.websites.env.production.vhostConfs.leila_syrwenne = { + certName = "leila"; + addToCerts = true; + hosts = [ "syrwennecreation.bouya.org" ]; + root = "${varDir}/Syrwennecreation"; + extraConfig = [ + '' + Use Stats syrwennecreation.bouya.org + + DirectoryIndex index.php index.htm index.html + Options Indexes FollowSymLinks MultiViews Includes + AllowOverride None + + + SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost" '' @@ -66,7 +88,7 @@ in { Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu - SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost" + SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost"