blob: 652f86d5d75cd045ba124bf67540ae24528eb22d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
{ lib, config, ... }:
let
cfg = config.myServices.websites.isabelle.iridologie;
varDir = "/var/lib/ftp/isabelle";
in {
options.myServices.websites.isabelle.iridologie.enable = lib.mkEnableOption "enable Iridologie's website";
config = lib.mkIf cfg.enable {
services.webstats.sites = [ { name = "iridologie.icommandeur.org"; } ];
services.websites.env.production.vhostConfs.iridologie = {
certName = "aten";
addToCerts = true;
hosts = [ "iridologie.icommandeur.org" "icommandeur.org" "www.icommandeur.org" ];
root = varDir;
extraConfig = [
''
Use Stats iridologie.icommandeur.org
RewriteEngine On
RewriteCond "%{HTTP_HOST}" "!^iridologie\.icommandeur\.org$" [NC]
RewriteRule ^(.+)$ https://iridologie.icommandeur.org$1 [R=302,L]
<Directory ${varDir}>
DirectoryIndex index.html
AllowOverride None
Require all granted
</Directory>
''
];
};
};
}
|