1 { lib, pkgs, config, ... }:
3 cfg = config.myServices.websites.leila.production;
4 varDir = "/var/lib/ftp/leila";
5 apacheUser = config.services.httpd.Prod.user;
6 apacheGroup = config.services.httpd.Prod.group;
8 options.myServices.websites.leila.production.enable = lib.mkEnableOption "enable Leila's websites in production";
10 config = lib.mkIf cfg.enable {
11 services.phpfpm.pools.leila = {
15 "listen.owner" = apacheUser;
16 "listen.group" = apacheGroup;
19 "pm.max_children" = "5";
20 "pm.process_idle_timeout" = "60";
22 "php_admin_value[open_basedir]" = "${varDir}:/tmp";
26 services.webstats.sites = [
27 { name = "leila.bouya.org"; }
28 { name = "chorale.leila.bouya.org"; }
29 { name = "syrwennecreation.bouya.org"; }
32 services.websites.env.production.modules = [ "proxy_fcgi" ];
33 services.websites.env.production.vhostConfs.leila_chorale = {
36 hosts = [ "chorale.leila.bouya.org" "chorale-vocanta.fr.nf" "www.chorale-vocanta.fr.nf" ];
37 root = "${varDir}/Chorale";
40 Use Stats chorale.leila.bouya.org
41 <Directory ${varDir}/Chorale>
42 DirectoryIndex index.php index.htm index.html
43 Options Indexes FollowSymLinks MultiViews Includes
47 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
50 SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost"
56 services.websites.env.production.vhostConfs.leila_syrwenne = {
59 hosts = [ "syrwennecreation.bouya.org" ];
60 root = "${varDir}/Syrwennecreation";
63 Use Stats syrwennecreation.bouya.org
64 <Directory ${varDir}/Syrwennecreation>
65 DirectoryIndex index.php index.htm index.html
66 Options Indexes FollowSymLinks MultiViews Includes
70 SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost"
76 services.websites.env.production.vhostConfs.leila = {
78 certMainHost = "leila.bouya.org";
79 hosts = [ "leila.bouya.org" ];
83 Use Stats leila.bouya.org
84 <Directory ${varDir}/Chorale>
85 DirectoryIndex index.htm index.html
86 Options Indexes FollowSymLinks MultiViews Includes
90 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
93 SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost"
97 DirectoryIndex index.htm index.html
98 Options Indexes FollowSymLinks MultiViews Includes