1 { lib, pkgs, config, ... }:
3 cfg = config.myServices.websites.leila.production;
4 varDir = "/var/lib/ftp/leila";
6 options.myServices.websites.leila.production.enable = lib.mkEnableOption "enable Leila's websites in production";
8 config = lib.mkIf cfg.enable {
9 services.phpfpm.poolConfigs.leila = ''
10 listen = /run/phpfpm/leila.sock
18 pm.process_idle_timeout = 60
20 php_admin_value[open_basedir] = "${varDir}:/tmp"
23 services.webstats.sites = [
24 { name = "leila.bouya.org"; }
25 { name = "chorale.leila.bouya.org"; }
26 { name = "syrwennecreation.bouya.org"; }
29 services.websites.env.production.modules = [ "proxy_fcgi" ];
30 services.websites.env.production.vhostConfs.leila_chorale = {
33 hosts = [ "chorale.leila.bouya.org" "chorale-vocanta.fr.nf" "www.chorale-vocanta.fr.nf" ];
34 root = "${varDir}/Chorale";
37 Use Stats chorale.leila.bouya.org
38 <Directory ${varDir}/Chorale>
39 DirectoryIndex index.php index.htm index.html
40 Options Indexes FollowSymLinks MultiViews Includes
44 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
47 SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost"
53 services.websites.env.production.vhostConfs.leila_syrwenne = {
56 hosts = [ "syrwennecreation.bouya.org" ];
57 root = "${varDir}/Syrwennecreation";
60 Use Stats syrwennecreation.bouya.org
61 <Directory ${varDir}/Syrwennecreation>
62 DirectoryIndex index.php index.htm index.html
63 Options Indexes FollowSymLinks MultiViews Includes
67 SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost"
73 services.websites.env.production.vhostConfs.leila = {
75 certMainHost = "leila.bouya.org";
76 hosts = [ "leila.bouya.org" ];
80 Use Stats leila.bouya.org
81 <Directory ${varDir}/Chorale>
82 DirectoryIndex index.htm index.html
83 Options Indexes FollowSymLinks MultiViews Includes
87 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
90 SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost"
94 DirectoryIndex index.htm index.html
95 Options Indexes FollowSymLinks MultiViews Includes