X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fleila%2Fproduction.nix;fp=modules%2Fprivate%2Fwebsites%2Fleila%2Fproduction.nix;h=0000000000000000000000000000000000000000;hp=8385bc7f081807e8bc4693983f32ee4986cad207;hb=1a64deeb894dc95e2645a75771732c6cc53a79ad;hpb=fa25ffd4583cc362075cd5e1b4130f33306103f0 diff --git a/modules/private/websites/leila/production.nix b/modules/private/websites/leila/production.nix deleted file mode 100644 index 8385bc7..0000000 --- a/modules/private/websites/leila/production.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ lib, pkgs, config, ... }: -let - cfg = config.myServices.websites.leila.production; - varDir = "/var/lib/ftp/leila"; - apacheUser = config.services.httpd.Prod.user; - apacheGroup = config.services.httpd.Prod.group; -in { - options.myServices.websites.leila.production.enable = lib.mkEnableOption "enable Leila's websites in production"; - - config = lib.mkIf cfg.enable { - services.phpfpm.pools.leila = { - user = apacheUser; - group = apacheGroup; - settings = { - "listen.owner" = apacheUser; - "listen.group" = apacheGroup; - - "pm" = "ondemand"; - "pm.max_children" = "5"; - "pm.process_idle_timeout" = "60"; - - "php_admin_value[open_basedir]" = "${varDir}:/tmp"; - "php_admin_value[max_execution_time]" = "1800"; - }; - phpOptions = config.services.phpfpm.phpOptions + '' - disable_functions = "mail" - ''; - phpPackage = pkgs.php72.withExtensions({ enabled, all }: enabled ++ [ all.imagick ]); - phpEnv = { - PATH = lib.makeBinPath [ pkgs.imagemagick ]; - }; - }; - - services.webstats.sites = [ - { name = "leila.bouya.org"; } - { name = "chorale.leila.bouya.org"; } - { name = "syrwennecreation.bouya.org"; } - ]; - - services.websites.env.production.modules = [ "proxy_fcgi" ]; - services.websites.env.production.vhostConfs.leila_chorale = { - certName = "leila"; - addToCerts = true; - hosts = [ "chorale.leila.bouya.org" "chorale-vocanta.fr.nf" "www.chorale-vocanta.fr.nf" ]; - root = "${varDir}/Chorale"; - extraConfig = [ - '' - Use Stats chorale.leila.bouya.org - - DirectoryIndex index.php index.htm index.html - Options Indexes FollowSymLinks MultiViews Includes - AllowOverride None - - Use LDAPConnect - Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu - - - 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" - - - '' - ]; - }; - services.websites.env.production.vhostConfs.leila = { - certName = "leila"; - certMainHost = "leila.bouya.org"; - hosts = [ "leila.bouya.org" ]; - root = varDir; - extraConfig = [ - '' - Use Stats leila.bouya.org - - DirectoryIndex index.htm index.html - Options Indexes FollowSymLinks MultiViews Includes - AllowOverride None - - Use LDAPConnect - Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu - - - SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost" - - - - DirectoryIndex index.htm index.html - Options Indexes FollowSymLinks MultiViews Includes - AllowOverride None - Require all granted - - '' - ]; - }; - }; -}