1 { lib, pkgs, config, myconfig, ... }:
3 cfg = config.services.myWebsites.Immae;
4 varDir = "/var/lib/ftp/immae";
5 env = myconfig.env.websites.immae;
7 options.services.myWebsites.Immae = {
9 enable = lib.mkEnableOption "enable Immae's website";
13 config = lib.mkIf cfg.production.enable {
14 services.webstats.sites = [ { name = "www.immae.eu"; } ];
16 services.myPhpfpm.poolConfigs.immae = ''
17 listen = /run/phpfpm/immae.sock
25 pm.process_idle_timeout = 60
27 php_admin_value[open_basedir] = "${varDir}:/tmp"
29 services.websites.production.modules = [ "proxy_fcgi" ];
30 services.websites.production.vhostConfs.immae = {
33 hosts = [ "www.immae.eu" ];
37 Use Stats www.immae.eu
40 SetHandler "proxy:unix:/run/phpfpm/immae.sock|fcgi://localhost"
44 DirectoryIndex index.php index.htm index.html
45 Options Indexes FollowSymLinks MultiViews Includes
52 Require ldap-group cn=blog,cn=immae.eu,ou=services,dc=immae,dc=eu
58 services.websites.production.vhostConfs.bouya = {
61 hosts = [ "bouya.org" "www.bouya.org" ];
64 RedirectMatch 301 ^/((?!\.well-known.*$).*)$ https://www.normalesup.org/~bouya/