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 website 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"; }
28 services.websites.env.production.modules = [ "proxy_fcgi" ];
29 services.websites.env.production.vhostConfs.leila_chorale = {
32 hosts = [ "chorale.leila.bouya.org" "chorale-vocanta.fr.nf" "www.chorale-vocanta.fr.nf" ];
33 root = "${varDir}/Chorale";
36 Use Stats chorale.leila.bouya.org
37 <Directory ${varDir}/Chorale>
38 DirectoryIndex index.php index.htm index.html
39 Options Indexes FollowSymLinks MultiViews Includes
43 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
46 SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost"
52 services.websites.env.production.vhostConfs.leila = {
54 certMainHost = "leila.bouya.org";
55 hosts = [ "leila.bouya.org" ];
59 Use Stats leila.bouya.org
60 <Directory ${varDir}/Chorale>
61 DirectoryIndex index.htm index.html
62 Options Indexes FollowSymLinks MultiViews Includes
66 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
69 SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost"
73 DirectoryIndex index.htm index.html
74 Options Indexes FollowSymLinks MultiViews Includes