diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-10 01:47:07 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-10 01:47:07 +0200 |
commit | c336bac4e891ad66c9fa110f840b00cf6bbe72bf (patch) | |
tree | af9c79df6fb150d77906b5b3960a34e273f71a0c /nixops | |
parent | 46f30ecca2e18c5abc7b270656e2b24f40e029ea (diff) | |
download | Nix-c336bac4e891ad66c9fa110f840b00cf6bbe72bf.tar.gz Nix-c336bac4e891ad66c9fa110f840b00cf6bbe72bf.tar.zst Nix-c336bac4e891ad66c9fa110f840b00cf6bbe72bf.zip |
Add Leila’s website
Diffstat (limited to 'nixops')
-rw-r--r-- | nixops/modules/websites/default.nix | 2 | ||||
-rw-r--r-- | nixops/modules/websites/ftp/leila.nix | 104 | ||||
-rw-r--r-- | nixops/modules/websites/ftp/leila_chorale_goaccess.conf | 99 | ||||
-rw-r--r-- | nixops/modules/websites/ftp/leila_goaccess.conf | 99 |
4 files changed, 304 insertions, 0 deletions
diff --git a/nixops/modules/websites/default.nix b/nixops/modules/websites/default.nix index 228966f..49dc5f7 100644 --- a/nixops/modules/websites/default.nix +++ b/nixops/modules/websites/default.nix | |||
@@ -116,6 +116,7 @@ in | |||
116 | ./ftp/nassime.nix | 116 | ./ftp/nassime.nix |
117 | ./ftp/florian.nix | 117 | ./ftp/florian.nix |
118 | ./ftp/denisejerome.nix | 118 | ./ftp/denisejerome.nix |
119 | ./ftp/leila.nix | ||
119 | ./ftp/immae.nix | 120 | ./ftp/immae.nix |
120 | ./ftp/release.nix | 121 | ./ftp/release.nix |
121 | ./ftp/temp.nix | 122 | ./ftp/temp.nix |
@@ -210,6 +211,7 @@ in | |||
210 | services.myWebsites.Jerome.production.enable = cfg.production.enable; | 211 | services.myWebsites.Jerome.production.enable = cfg.production.enable; |
211 | services.myWebsites.Nassime.production.enable = cfg.production.enable; | 212 | services.myWebsites.Nassime.production.enable = cfg.production.enable; |
212 | services.myWebsites.Florian.production.enable = cfg.production.enable; | 213 | services.myWebsites.Florian.production.enable = cfg.production.enable; |
214 | services.myWebsites.Leila.production.enable = cfg.production.enable; | ||
213 | services.myWebsites.DeniseJerome.production.enable = cfg.production.enable; | 215 | services.myWebsites.DeniseJerome.production.enable = cfg.production.enable; |
214 | services.myWebsites.Emilia.production.enable = cfg.production.enable; | 216 | services.myWebsites.Emilia.production.enable = cfg.production.enable; |
215 | services.myWebsites.Capitaines.production.enable = cfg.production.enable; | 217 | services.myWebsites.Capitaines.production.enable = cfg.production.enable; |
diff --git a/nixops/modules/websites/ftp/leila.nix b/nixops/modules/websites/ftp/leila.nix new file mode 100644 index 0000000..ae917ba --- /dev/null +++ b/nixops/modules/websites/ftp/leila.nix | |||
@@ -0,0 +1,104 @@ | |||
1 | { lib, config, ... }: | ||
2 | let | ||
3 | cfg = config.services.myWebsites.Leila; | ||
4 | varDir = "/var/lib/ftp/leila"; | ||
5 | in { | ||
6 | options.services.myWebsites.Leila = { | ||
7 | production = { | ||
8 | enable = lib.mkEnableOption "enable Leila's website in production"; | ||
9 | }; | ||
10 | }; | ||
11 | |||
12 | imports = [ | ||
13 | ../commons/stats.nix | ||
14 | ]; | ||
15 | |||
16 | config = (lib.mkIf cfg.production.enable { | ||
17 | security.acme.certs."leila" = config.services.myCertificates.certConfig // { | ||
18 | domain = "leila.bouya.org"; | ||
19 | extraDomains = { | ||
20 | "chorale.leila.bouya.org" = null; | ||
21 | "chorale-vocanta.fr.nf" = null; | ||
22 | "www.chorale-vocanta.fr.nf" = null; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | services.myPhpfpm.poolConfigs.leila = '' | ||
27 | listen = /run/phpfpm/leila.sock | ||
28 | user = wwwrun | ||
29 | group = wwwrun | ||
30 | listen.owner = wwwrun | ||
31 | listen.group = wwwrun | ||
32 | |||
33 | pm = ondemand | ||
34 | pm.max_children = 5 | ||
35 | pm.process_idle_timeout = 60 | ||
36 | |||
37 | php_admin_value[open_basedir] = "${varDir}:/tmp" | ||
38 | ''; | ||
39 | |||
40 | services.myWebsites.commons.stats.enable = true; | ||
41 | services.myWebsites.commons.stats.sites = [ | ||
42 | { | ||
43 | name = "leila.bouya.org"; | ||
44 | conf = ./leila_goaccess.conf; | ||
45 | } | ||
46 | { | ||
47 | name = "chorale.leila.bouya.org"; | ||
48 | conf = ./leila_chorale_goaccess.conf; | ||
49 | } | ||
50 | ]; | ||
51 | |||
52 | services.myWebsites.production.modules = [ "proxy_fcgi" ]; | ||
53 | services.myWebsites.production.vhostConfs.leila_chorale = { | ||
54 | certName = "leila"; | ||
55 | hosts = [ "chorale.leila.bouya.org" "chorale-vocanta.fr.nf" "www.chorale-vocanta.fr.nf" ]; | ||
56 | root = "${varDir}/Chorale"; | ||
57 | extraConfig = [ | ||
58 | '' | ||
59 | Use Stats chorale.leila.bouya.org | ||
60 | <Directory ${varDir}/Chorale> | ||
61 | DirectoryIndex index.php index.htm index.html | ||
62 | Options Indexes FollowSymLinks MultiViews Includes | ||
63 | AllowOverride None | ||
64 | |||
65 | Use LDAPConnect | ||
66 | Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu | ||
67 | |||
68 | <FilesMatch "\.php$"> | ||
69 | SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost" | ||
70 | </FilesMatch> | ||
71 | </Directory> | ||
72 | '' | ||
73 | ]; | ||
74 | }; | ||
75 | services.myWebsites.production.vhostConfs.leila = { | ||
76 | certName = "leila"; | ||
77 | hosts = [ "leila.bouya.org" ]; | ||
78 | root = varDir; | ||
79 | extraConfig = [ | ||
80 | '' | ||
81 | Use Stats leila.bouya.org | ||
82 | <Directory ${varDir}/Chorale> | ||
83 | DirectoryIndex index.htm index.html | ||
84 | Options Indexes FollowSymLinks MultiViews Includes | ||
85 | AllowOverride None | ||
86 | |||
87 | Use LDAPConnect | ||
88 | Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu | ||
89 | |||
90 | <FilesMatch "\.php$"> | ||
91 | SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost" | ||
92 | </FilesMatch> | ||
93 | </Directory> | ||
94 | <Directory ${varDir}> | ||
95 | DirectoryIndex index.htm index.html | ||
96 | Options Indexes FollowSymLinks MultiViews Includes | ||
97 | AllowOverride None | ||
98 | Require all granted | ||
99 | </Directory> | ||
100 | '' | ||
101 | ]; | ||
102 | }; | ||
103 | }); | ||
104 | } | ||
diff --git a/nixops/modules/websites/ftp/leila_chorale_goaccess.conf b/nixops/modules/websites/ftp/leila_chorale_goaccess.conf new file mode 100644 index 0000000..2c73b26 --- /dev/null +++ b/nixops/modules/websites/ftp/leila_chorale_goaccess.conf | |||
@@ -0,0 +1,99 @@ | |||
1 | time-format %H:%M:%S | ||
2 | date-format %d/%b/%Y | ||
3 | |||
4 | #sur immae.eu | ||
5 | #log-format %v %h %^[%d:%t %^] "%r" %s %b "%R" "%u" $^ | ||
6 | |||
7 | log-format VCOMBINED | ||
8 | #= %v:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u" | ||
9 | |||
10 | html-prefs {"theme":"bright","layout":"vertical"} | ||
11 | |||
12 | exclude-ip 188.165.209.148 | ||
13 | exclude-ip 178.33.252.96 | ||
14 | exclude-ip 2001:41d0:2:9c94::1 | ||
15 | exclude-ip 2001:41d0:2:9c94:: | ||
16 | exclude-ip 176.9.151.89 | ||
17 | exclude-ip 2a01:4f8:160:3445:: | ||
18 | exclude-ip 82.255.56.72 | ||
19 | |||
20 | no-query-string true | ||
21 | |||
22 | keep-db-files true | ||
23 | load-from-disk true | ||
24 | db-path /var/lib/goaccess/chorale.leila.bouya.org | ||
25 | |||
26 | ignore-panel REFERRERS | ||
27 | ignore-panel KEYPHRASES | ||
28 | |||
29 | static-file .css | ||
30 | static-file .js | ||
31 | static-file .jpg | ||
32 | static-file .png | ||
33 | static-file .gif | ||
34 | static-file .ico | ||
35 | static-file .jpeg | ||
36 | static-file .pdf | ||
37 | static-file .csv | ||
38 | static-file .mpeg | ||
39 | static-file .mpg | ||
40 | static-file .swf | ||
41 | static-file .woff | ||
42 | static-file .woff2 | ||
43 | static-file .xls | ||
44 | static-file .xlsx | ||
45 | static-file .doc | ||
46 | static-file .docx | ||
47 | static-file .ppt | ||
48 | static-file .pptx | ||
49 | static-file .txt | ||
50 | static-file .zip | ||
51 | static-file .ogg | ||
52 | static-file .mp3 | ||
53 | static-file .mp4 | ||
54 | static-file .exe | ||
55 | static-file .iso | ||
56 | static-file .gz | ||
57 | static-file .rar | ||
58 | static-file .svg | ||
59 | static-file .bmp | ||
60 | static-file .tar | ||
61 | static-file .tgz | ||
62 | static-file .tiff | ||
63 | static-file .tif | ||
64 | static-file .ttf | ||
65 | static-file .flv | ||
66 | #static-file .less | ||
67 | #static-file .ac3 | ||
68 | #static-file .avi | ||
69 | #static-file .bz2 | ||
70 | #static-file .class | ||
71 | #static-file .cue | ||
72 | #static-file .dae | ||
73 | #static-file .dat | ||
74 | #static-file .dts | ||
75 | #static-file .ejs | ||
76 | #static-file .eot | ||
77 | #static-file .eps | ||
78 | #static-file .img | ||
79 | #static-file .jar | ||
80 | #static-file .map | ||
81 | #static-file .mid | ||
82 | #static-file .midi | ||
83 | #static-file .ogv | ||
84 | #static-file .webm | ||
85 | #static-file .mkv | ||
86 | #static-file .odp | ||
87 | #static-file .ods | ||
88 | #static-file .odt | ||
89 | #static-file .otf | ||
90 | #static-file .pict | ||
91 | #static-file .pls | ||
92 | #static-file .ps | ||
93 | #static-file .qt | ||
94 | #static-file .rm | ||
95 | #static-file .svgz | ||
96 | #static-file .wav | ||
97 | #static-file .webp | ||
98 | |||
99 | |||
diff --git a/nixops/modules/websites/ftp/leila_goaccess.conf b/nixops/modules/websites/ftp/leila_goaccess.conf new file mode 100644 index 0000000..0c508bb --- /dev/null +++ b/nixops/modules/websites/ftp/leila_goaccess.conf | |||
@@ -0,0 +1,99 @@ | |||
1 | time-format %H:%M:%S | ||
2 | date-format %d/%b/%Y | ||
3 | |||
4 | #sur immae.eu | ||
5 | #log-format %v %h %^[%d:%t %^] "%r" %s %b "%R" "%u" $^ | ||
6 | |||
7 | log-format VCOMBINED | ||
8 | #= %v:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u" | ||
9 | |||
10 | html-prefs {"theme":"bright","layout":"vertical"} | ||
11 | |||
12 | exclude-ip 188.165.209.148 | ||
13 | exclude-ip 178.33.252.96 | ||
14 | exclude-ip 2001:41d0:2:9c94::1 | ||
15 | exclude-ip 2001:41d0:2:9c94:: | ||
16 | exclude-ip 176.9.151.89 | ||
17 | exclude-ip 2a01:4f8:160:3445:: | ||
18 | exclude-ip 82.255.56.72 | ||
19 | |||
20 | no-query-string true | ||
21 | |||
22 | keep-db-files true | ||
23 | load-from-disk true | ||
24 | db-path /var/lib/goaccess/leila.bouya.org | ||
25 | |||
26 | ignore-panel REFERRERS | ||
27 | ignore-panel KEYPHRASES | ||
28 | |||
29 | static-file .css | ||
30 | static-file .js | ||
31 | static-file .jpg | ||
32 | static-file .png | ||
33 | static-file .gif | ||
34 | static-file .ico | ||
35 | static-file .jpeg | ||
36 | static-file .pdf | ||
37 | static-file .csv | ||
38 | static-file .mpeg | ||
39 | static-file .mpg | ||
40 | static-file .swf | ||
41 | static-file .woff | ||
42 | static-file .woff2 | ||
43 | static-file .xls | ||
44 | static-file .xlsx | ||
45 | static-file .doc | ||
46 | static-file .docx | ||
47 | static-file .ppt | ||
48 | static-file .pptx | ||
49 | static-file .txt | ||
50 | static-file .zip | ||
51 | static-file .ogg | ||
52 | static-file .mp3 | ||
53 | static-file .mp4 | ||
54 | static-file .exe | ||
55 | static-file .iso | ||
56 | static-file .gz | ||
57 | static-file .rar | ||
58 | static-file .svg | ||
59 | static-file .bmp | ||
60 | static-file .tar | ||
61 | static-file .tgz | ||
62 | static-file .tiff | ||
63 | static-file .tif | ||
64 | static-file .ttf | ||
65 | static-file .flv | ||
66 | #static-file .less | ||
67 | #static-file .ac3 | ||
68 | #static-file .avi | ||
69 | #static-file .bz2 | ||
70 | #static-file .class | ||
71 | #static-file .cue | ||
72 | #static-file .dae | ||
73 | #static-file .dat | ||
74 | #static-file .dts | ||
75 | #static-file .ejs | ||
76 | #static-file .eot | ||
77 | #static-file .eps | ||
78 | #static-file .img | ||
79 | #static-file .jar | ||
80 | #static-file .map | ||
81 | #static-file .mid | ||
82 | #static-file .midi | ||
83 | #static-file .ogv | ||
84 | #static-file .webm | ||
85 | #static-file .mkv | ||
86 | #static-file .odp | ||
87 | #static-file .ods | ||
88 | #static-file .odt | ||
89 | #static-file .otf | ||
90 | #static-file .pict | ||
91 | #static-file .pls | ||
92 | #static-file .ps | ||
93 | #static-file .qt | ||
94 | #static-file .rm | ||
95 | #static-file .svgz | ||
96 | #static-file .wav | ||
97 | #static-file .webp | ||
98 | |||
99 | |||