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.pools.leila = {
13 "listen.owner" = "wwwrun";
14 "listen.group" = "wwwrun";
17 "pm.max_children" = "5";
18 "pm.process_idle_timeout" = "60";
20 "php_admin_value[open_basedir]" = "${varDir}:/tmp";
24 services.webstats.sites = [
25 { name = "leila.bouya.org"; }
26 { name = "chorale.leila.bouya.org"; }
27 { name = "syrwennecreation.bouya.org"; }
30 services.websites.env.production.modules = [ "proxy_fcgi" ];
31 services.websites.env.production.vhostConfs.leila_chorale = {
34 hosts = [ "chorale.leila.bouya.org" "chorale-vocanta.fr.nf" "www.chorale-vocanta.fr.nf" ];
35 root = "${varDir}/Chorale";
38 Use Stats chorale.leila.bouya.org
39 <Directory ${varDir}/Chorale>
40 DirectoryIndex index.php index.htm index.html
41 Options Indexes FollowSymLinks MultiViews Includes
45 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
48 SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost"
54 services.websites.env.production.vhostConfs.leila_syrwenne = {
57 hosts = [ "syrwennecreation.bouya.org" ];
58 root = "${varDir}/Syrwennecreation";
61 Use Stats syrwennecreation.bouya.org
62 <Directory ${varDir}/Syrwennecreation>
63 DirectoryIndex index.php index.htm index.html
64 Options Indexes FollowSymLinks MultiViews Includes
68 SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost"
74 services.websites.env.production.vhostConfs.leila = {
76 certMainHost = "leila.bouya.org";
77 hosts = [ "leila.bouya.org" ];
81 Use Stats leila.bouya.org
82 <Directory ${varDir}/Chorale>
83 DirectoryIndex index.htm index.html
84 Options Indexes FollowSymLinks MultiViews Includes
88 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
91 SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost"
95 DirectoryIndex index.htm index.html
96 Options Indexes FollowSymLinks MultiViews Includes