]>
Commit | Line | Data |
---|---|---|
1 | { lib, pkgs, config, myconfig, ... }: | |
2 | let | |
3 | cfg = config.myServices.websites.immae.production; | |
4 | varDir = "/var/lib/ftp/immae"; | |
5 | env = myconfig.env.websites.immae; | |
6 | in { | |
7 | options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website"; | |
8 | ||
9 | config = lib.mkIf cfg.enable { | |
10 | services.webstats.sites = [ { name = "www.immae.eu"; } ]; | |
11 | ||
12 | services.websites.env.production.vhostConfs.immae = { | |
13 | certName = "eldiron"; | |
14 | addToCerts = true; | |
15 | hosts = [ "www.immae.eu" ]; | |
16 | root = varDir; | |
17 | extraConfig = [ | |
18 | '' | |
19 | Use Stats www.immae.eu | |
20 | ||
21 | <Directory ${varDir}> | |
22 | DirectoryIndex index.php index.htm index.html | |
23 | Options Indexes FollowSymLinks MultiViews Includes | |
24 | AllowOverride All | |
25 | Require all granted | |
26 | </Directory> | |
27 | ||
28 | <Location /blog_old/> | |
29 | Use LDAPConnect | |
30 | Require ldap-group cn=blog,cn=immae.eu,ou=services,dc=immae,dc=eu | |
31 | </Location> | |
32 | '' | |
33 | ]; | |
34 | }; | |
35 | ||
36 | services.websites.env.production.vhostConfs.bouya = { | |
37 | certName = "eldiron"; | |
38 | addToCerts = true; | |
39 | hosts = [ "bouya.org" "www.bouya.org" ]; | |
40 | root = null; | |
41 | extraConfig = [ '' | |
42 | RedirectMatch 301 ^/((?!\.well-known.*$).*)$ https://www.normalesup.org/~bouya/ | |
43 | '' ]; | |
44 | }; | |
45 | }; | |
46 | } |