1 { lib, pkgs, config, ... }:
3 cfg = config.services.myWebsites.Leila;
4 varDir = "/var/lib/ftp/leila";
6 options.services.myWebsites.Leila = {
8 enable = lib.mkEnableOption "enable Leila's website in production";
12 config = (lib.mkIf cfg.production.enable {
13 services.myPhpfpm.poolConfigs.leila = ''
14 listen = /run/phpfpm/leila.sock
22 pm.process_idle_timeout = 60
24 php_admin_value[open_basedir] = "${varDir}:/tmp"
27 services.webstats.sites = [
28 { name = "leila.bouya.org"; }
29 { name = "chorale.leila.bouya.org"; }
32 services.websites.production.modules = [ "proxy_fcgi" ];
33 services.websites.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:/run/phpfpm/leila.sock|fcgi://localhost"
56 services.websites.production.vhostConfs.leila = {
58 certMainHost = "leila.bouya.org";
59 hosts = [ "leila.bouya.org" ];
63 Use Stats leila.bouya.org
64 <Directory ${varDir}/Chorale>
65 DirectoryIndex index.htm index.html
66 Options Indexes FollowSymLinks MultiViews Includes
70 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
73 SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost"
77 DirectoryIndex index.htm index.html
78 Options Indexes FollowSymLinks MultiViews Includes