]>
Commit | Line | Data |
---|---|---|
ab8f306d | 1 | { lib, pkgs, config, ... }: |
f759f52e | 2 | let |
f8026b6e | 3 | cfg = config.myServices.websites.immae.production; |
8fa7ff2c | 4 | varDir = "/var/lib/buildbot/outputs/immaeEu"; |
0012da0f IB |
5 | coursDir = "/var/lib/buildbot/outputs/cours"; |
6 | rechercheDir = "/var/lib/buildbot/outputs/recherche"; | |
ab8f306d | 7 | env = config.myEnv.websites.immae; |
f759f52e | 8 | in { |
f8026b6e | 9 | options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website"; |
f759f52e | 10 | |
f8026b6e | 11 | config = lib.mkIf cfg.enable { |
9eae2b47 | 12 | services.webstats.sites = [ { name = "www.immae.eu"; } ]; |
f759f52e | 13 | |
29f8cb85 | 14 | services.websites.env.production.vhostConfs.immae = { |
f759f52e | 15 | certName = "eldiron"; |
7df420c2 | 16 | addToCerts = true; |
f759f52e IB |
17 | hosts = [ "www.immae.eu" ]; |
18 | root = varDir; | |
19 | extraConfig = [ | |
20 | '' | |
21 | Use Stats www.immae.eu | |
22 | ||
f759f52e | 23 | <Directory ${varDir}> |
0012da0f IB |
24 | DirectoryIndex index.htm index.html |
25 | Options Indexes FollowSymLinks MultiViews Includes | |
26 | AllowOverride All | |
27 | Require all granted | |
28 | </Directory> | |
29 | ||
30 | Alias /cours ${coursDir} | |
31 | <Directory ${coursDir}> | |
32 | DirectoryIndex index.htm index.html | |
33 | Options Indexes FollowSymLinks MultiViews Includes | |
34 | AllowOverride All | |
35 | Require all granted | |
36 | </Directory> | |
37 | ||
38 | Alias /recherche ${rechercheDir} | |
39 | <Directory ${rechercheDir}> | |
40 | DirectoryIndex index.htm index.html | |
f759f52e IB |
41 | Options Indexes FollowSymLinks MultiViews Includes |
42 | AllowOverride All | |
43 | Require all granted | |
44 | </Directory> | |
f759f52e IB |
45 | '' |
46 | ]; | |
47 | }; | |
70606070 | 48 | |
29f8cb85 | 49 | services.websites.env.production.vhostConfs.bouya = { |
70606070 | 50 | certName = "eldiron"; |
7df420c2 | 51 | addToCerts = true; |
70606070 IB |
52 | hosts = [ "bouya.org" "www.bouya.org" ]; |
53 | root = null; | |
54 | extraConfig = [ '' | |
55 | RedirectMatch 301 ^/((?!\.well-known.*$).*)$ https://www.normalesup.org/~bouya/ | |
56 | '' ]; | |
57 | }; | |
f759f52e IB |
58 | }; |
59 | } |