]>
Commit | Line | Data |
---|---|---|
8a964143 | 1 | { lib, pkgs, config, myconfig, ... }: |
f759f52e | 2 | let |
f8026b6e IB |
3 | cfg = config.myServices.websites.immae.production; |
4 | varDir = "/var/lib/ftp/immae"; | |
5 | env = myconfig.env.websites.immae; | |
f759f52e | 6 | in { |
f8026b6e | 7 | options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website"; |
f759f52e | 8 | |
f8026b6e | 9 | config = lib.mkIf cfg.enable { |
9eae2b47 | 10 | services.webstats.sites = [ { name = "www.immae.eu"; } ]; |
f759f52e | 11 | |
29f8cb85 | 12 | services.websites.env.production.vhostConfs.immae = { |
f759f52e | 13 | certName = "eldiron"; |
7df420c2 | 14 | addToCerts = true; |
f759f52e IB |
15 | hosts = [ "www.immae.eu" ]; |
16 | root = varDir; | |
17 | extraConfig = [ | |
18 | '' | |
19 | Use Stats www.immae.eu | |
20 | ||
f759f52e IB |
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 | }; | |
70606070 | 35 | |
29f8cb85 | 36 | services.websites.env.production.vhostConfs.bouya = { |
70606070 | 37 | certName = "eldiron"; |
7df420c2 | 38 | addToCerts = true; |
70606070 IB |
39 | hosts = [ "bouya.org" "www.bouya.org" ]; |
40 | root = null; | |
41 | extraConfig = [ '' | |
42 | RedirectMatch 301 ^/((?!\.well-known.*$).*)$ https://www.normalesup.org/~bouya/ | |
43 | '' ]; | |
44 | }; | |
f759f52e IB |
45 | }; |
46 | } |