1 { lib, pkgs, config, myconfig, ... }:
3 cfg = config.myServices.websites.immae.production;
4 varDir = "/var/lib/ftp/immae";
5 env = myconfig.env.websites.immae;
7 options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website";
9 config = lib.mkIf cfg.enable {
10 services.webstats.sites = [ { name = "www.immae.eu"; } ];
12 services.phpfpm.pools.immae = {
13 listen = "/run/phpfpm/immae.sock";
22 pm.process_idle_timeout = 60
24 php_admin_value[open_basedir] = "${varDir}:/tmp"
26 phpOptions = config.services.phpfpm.phpOptions + ''
27 extension=${pkgs.php}/lib/php/extensions/mysqli.so
30 services.websites.env.production.modules = [ "proxy_fcgi" ];
31 services.websites.env.production.vhostConfs.immae = {
34 hosts = [ "www.immae.eu" ];
38 Use Stats www.immae.eu
41 SetHandler "proxy:unix:/run/phpfpm/immae.sock|fcgi://localhost"
45 DirectoryIndex index.php index.htm index.html
46 Options Indexes FollowSymLinks MultiViews Includes
53 Require ldap-group cn=blog,cn=immae.eu,ou=services,dc=immae,dc=eu
59 services.websites.env.production.vhostConfs.bouya = {
62 hosts = [ "bouya.org" "www.bouya.org" ];
65 RedirectMatch 301 ^/((?!\.well-known.*$).*)$ https://www.normalesup.org/~bouya/