diff options
Diffstat (limited to 'nixops')
-rw-r--r-- | nixops/modules/websites/default.nix | 2 | ||||
-rw-r--r-- | nixops/modules/websites/ftp/immae.nix | 69 | ||||
-rw-r--r-- | nixops/modules/websites/ftp/immae_goaccess.conf | 99 |
3 files changed, 170 insertions, 0 deletions
diff --git a/nixops/modules/websites/default.nix b/nixops/modules/websites/default.nix index 1093617..4c9c7fe 100644 --- a/nixops/modules/websites/default.nix +++ b/nixops/modules/websites/default.nix | |||
@@ -97,6 +97,7 @@ in | |||
97 | ./ftp/nassime.nix | 97 | ./ftp/nassime.nix |
98 | ./ftp/florian.nix | 98 | ./ftp/florian.nix |
99 | ./ftp/denisejerome.nix | 99 | ./ftp/denisejerome.nix |
100 | ./ftp/immae.nix | ||
100 | ./tools/db | 101 | ./tools/db |
101 | ./tools/tools | 102 | ./tools/tools |
102 | ./tools/dav | 103 | ./tools/dav |
@@ -199,6 +200,7 @@ in | |||
199 | services.myWebsites.DeniseJerome.production.enable = cfg.production.enable; | 200 | services.myWebsites.DeniseJerome.production.enable = cfg.production.enable; |
200 | services.myWebsites.Emilia.production.enable = cfg.production.enable; | 201 | services.myWebsites.Emilia.production.enable = cfg.production.enable; |
201 | services.myWebsites.Capitaines.production.enable = cfg.production.enable; | 202 | services.myWebsites.Capitaines.production.enable = cfg.production.enable; |
203 | services.myWebsites.Immae.production.enable = cfg.production.enable; | ||
202 | 204 | ||
203 | services.myWebsites.Chloe.integration.enable = cfg.integration.enable; | 205 | services.myWebsites.Chloe.integration.enable = cfg.integration.enable; |
204 | services.myWebsites.Ludivine.integration.enable = cfg.integration.enable; | 206 | services.myWebsites.Ludivine.integration.enable = cfg.integration.enable; |
diff --git a/nixops/modules/websites/ftp/immae.nix b/nixops/modules/websites/ftp/immae.nix new file mode 100644 index 0000000..6acfe44 --- /dev/null +++ b/nixops/modules/websites/ftp/immae.nix | |||
@@ -0,0 +1,69 @@ | |||
1 | { lib, pkgs, config, myconfig, mylibs, ... }: | ||
2 | let | ||
3 | cfg = config.services.myWebsites.Immae; | ||
4 | varDir = "/var/lib/ftp/immae"; | ||
5 | env = myconfig.env.websites.immae; | ||
6 | in { | ||
7 | options.services.myWebsites.Immae = { | ||
8 | production = { | ||
9 | enable = lib.mkEnableOption "enable Immae's website"; | ||
10 | }; | ||
11 | }; | ||
12 | |||
13 | imports = [ | ||
14 | ../commons/stats.nix | ||
15 | ]; | ||
16 | |||
17 | config = lib.mkIf cfg.production.enable { | ||
18 | services.myWebsites.commons.stats.enable = true; | ||
19 | services.myWebsites.commons.stats.sites = [ | ||
20 | { | ||
21 | name = "www.immae.eu"; | ||
22 | conf = ./immae_goaccess.conf; | ||
23 | } | ||
24 | ]; | ||
25 | |||
26 | security.acme.certs."eldiron".extraDomains."www.immae.eu" = null; | ||
27 | |||
28 | services.myPhpfpm.poolConfigs.immae = '' | ||
29 | listen = /run/phpfpm/immae.sock | ||
30 | user = wwwrun | ||
31 | group = wwwrun | ||
32 | listen.owner = wwwrun | ||
33 | listen.group = wwwrun | ||
34 | |||
35 | pm = ondemand | ||
36 | pm.max_children = 5 | ||
37 | pm.process_idle_timeout = 60 | ||
38 | |||
39 | php_admin_value[open_basedir] = "${varDir}:/tmp" | ||
40 | ''; | ||
41 | services.myWebsites.production.modules = [ "proxy_fcgi" ]; | ||
42 | services.myWebsites.production.vhostConfs.immae = { | ||
43 | certName = "eldiron"; | ||
44 | hosts = [ "www.immae.eu" ]; | ||
45 | root = varDir; | ||
46 | extraConfig = [ | ||
47 | '' | ||
48 | Use Stats www.immae.eu | ||
49 | |||
50 | <FilesMatch "\.php$"> | ||
51 | SetHandler "proxy:unix:/run/phpfpm/immae.sock|fcgi://localhost" | ||
52 | </FilesMatch> | ||
53 | |||
54 | <Directory ${varDir}> | ||
55 | DirectoryIndex index.php index.htm index.html | ||
56 | Options Indexes FollowSymLinks MultiViews Includes | ||
57 | AllowOverride All | ||
58 | Require all granted | ||
59 | </Directory> | ||
60 | |||
61 | <Location /blog_old/> | ||
62 | Use LDAPConnect | ||
63 | Require ldap-group cn=blog,cn=immae.eu,ou=services,dc=immae,dc=eu | ||
64 | </Location> | ||
65 | '' | ||
66 | ]; | ||
67 | }; | ||
68 | }; | ||
69 | } | ||
diff --git a/nixops/modules/websites/ftp/immae_goaccess.conf b/nixops/modules/websites/ftp/immae_goaccess.conf new file mode 100644 index 0000000..db65335 --- /dev/null +++ b/nixops/modules/websites/ftp/immae_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/www.immae.eu | ||
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 | |||