]>
Commit | Line | Data |
---|---|---|
f8bde3d6 | 1 | { lib, pkgs, config, mylibs, myconfig, ... }: |
42429ef0 IB |
2 | let |
3 | cfg = config.services.myWebsites; | |
7da3ceec IB |
4 | www_root = "/run/current-system/webapps/_www"; |
5 | theme_root = "/run/current-system/webapps/_theme"; | |
f8bde3d6 IB |
6 | makeService = name: cfg: let |
7 | toVhost = vhostConf: { | |
8 | enableSSL = true; | |
9 | sslServerCert = "/var/lib/acme/${vhostConf.certName}/cert.pem"; | |
10 | sslServerKey = "/var/lib/acme/${vhostConf.certName}/key.pem"; | |
11 | sslServerChain = "/var/lib/acme/${vhostConf.certName}/fullchain.pem"; | |
12 | logFormat = "combinedVhost"; | |
d68bb46b | 13 | listen = map (ip: { inherit ip; port = 443; }) cfg.ips; |
f8bde3d6 IB |
14 | hostName = builtins.head vhostConf.hosts; |
15 | serverAliases = builtins.tail vhostConf.hosts or []; | |
16 | documentRoot = vhostConf.root; | |
17 | extraConfig = builtins.concatStringsSep "\n" vhostConf.extraConfig; | |
18 | }; | |
e2f5cc37 | 19 | nosslVhost = { |
d68bb46b | 20 | listen = map (ip: { inherit ip; port = 80; }) cfg.ips; |
e2f5cc37 IB |
21 | hostName = "nossl.immae.eu"; |
22 | enableSSL = false; | |
23 | logFormat = "combinedVhost"; | |
7da3ceec | 24 | documentRoot = www_root; |
e2f5cc37 | 25 | extraConfig = '' |
7da3ceec | 26 | <Directory ${www_root}> |
e2f5cc37 IB |
27 | DirectoryIndex nossl.html |
28 | AllowOverride None | |
29 | Require all granted | |
30 | ||
31 | RewriteEngine on | |
32 | RewriteRule ^/(.+) / [L] | |
33 | </Directory> | |
34 | ''; | |
35 | }; | |
950ca5ee | 36 | redirectVhost = { # Should go last, catchall http -> https redirect |
d68bb46b | 37 | listen = map (ip: { inherit ip; port = 80; }) cfg.ips; |
950ca5ee IB |
38 | hostName = "redirectSSL"; |
39 | serverAliases = [ "*" ]; | |
40 | enableSSL = false; | |
41 | logFormat = "combinedVhost"; | |
42 | documentRoot = "/var/lib/acme/acme-challenge"; | |
43 | extraConfig = '' | |
44 | RewriteEngine on | |
45 | RewriteCond "%{REQUEST_URI}" "!^/\.well-known" | |
46 | RewriteRule ^(.+) https://%{HTTP_HOST}$1 [R=301] | |
47 | # To redirect in specific "VirtualHost *:80", do | |
48 | # RedirectMatch 301 ^/((?!\.well-known.*$).*)$ https://host/$1 | |
49 | # rather than rewrite | |
50 | ''; | |
51 | }; | |
52 | fallbackVhost = toVhost { # Should go first, default choice | |
53 | certName = "eldiron"; | |
54 | hosts = ["eldiron.immae.eu" ]; | |
7da3ceec | 55 | root = www_root; |
950ca5ee IB |
56 | extraConfig = [ "DirectoryIndex index.htm" ]; |
57 | }; | |
f8bde3d6 IB |
58 | in rec { |
59 | enable = true; | |
d68bb46b | 60 | listen = map (ip: { inherit ip; port = 443; }) cfg.ips; |
f8bde3d6 IB |
61 | stateDir = "/run/httpd_${name}"; |
62 | logPerVirtualHost = true; | |
63 | multiProcessingModule = "worker"; | |
64 | adminAddr = "httpd@immae.eu"; | |
65 | logFormat = "combinedVhost"; | |
66 | extraModules = pkgs.lib.lists.unique (pkgs.lib.lists.flatten cfg.modules); | |
67 | extraConfig = builtins.concatStringsSep "\n" cfg.extraConfig; | |
950ca5ee | 68 | virtualHosts = [ fallbackVhost ] |
e2f5cc37 | 69 | ++ lib.optionals (name == "tools") [ nosslVhost ] |
950ca5ee IB |
70 | ++ (pkgs.lib.attrsets.mapAttrsToList (n: v: toVhost v) cfg.vhostConfs) |
71 | ++ [ redirectVhost ]; | |
f8bde3d6 | 72 | }; |
d68bb46b | 73 | makeServiceOptions = name: { |
f8bde3d6 | 74 | enable = lib.mkEnableOption "enable websites in ${name}"; |
d68bb46b IB |
75 | ips = lib.mkOption { |
76 | type = lib.types.listOf lib.types.string; | |
77 | default = let | |
78 | ips = myconfig.env.servers.eldiron.ips.${name}; | |
79 | in | |
80 | [ips.ip4] ++ (ips.ip6 or []); | |
81 | description = "${name} ips to listen to"; | |
f8bde3d6 IB |
82 | }; |
83 | modules = lib.mkOption { | |
84 | type = lib.types.listOf (lib.types.str); | |
85 | default = []; | |
86 | }; | |
87 | extraConfig = lib.mkOption { | |
88 | type = lib.types.listOf (lib.types.lines); | |
89 | default = []; | |
90 | }; | |
91 | vhostConfs = lib.mkOption { | |
92 | type = lib.types.attrsOf (lib.types.submodule { | |
93 | options = { | |
94 | certName = lib.mkOption { type = lib.types.string; }; | |
95 | hosts = lib.mkOption { type = lib.types.listOf lib.types.string; }; | |
96 | root = lib.mkOption { type = lib.types.nullOr lib.types.path; }; | |
97 | extraConfig = lib.mkOption { type = lib.types.listOf lib.types.lines; default = []; }; | |
98 | }; | |
99 | }); | |
100 | }; | |
101 | }; | |
f8d3b61a IB |
102 | makeModules = cfg: pkgs.lib.lists.flatten (pkgs.lib.attrsets.mapAttrsToList (n: v: v.modules or []) cfg.apacheConfig); |
103 | makeExtraConfig = cfg: (builtins.filter (x: x != null) (pkgs.lib.attrsets.mapAttrsToList (n: v: v.extraConfig or null) cfg.apacheConfig)); | |
42429ef0 IB |
104 | in |
105 | { | |
106 | imports = [ | |
54307da4 IB |
107 | ./chloe |
108 | ./ludivine | |
109 | ./aten | |
110 | ./piedsjaloux | |
111 | ./connexionswing | |
2f0f1c48 | 112 | ./tellesflorian |
9a35b8f9 | 113 | ./emilia |
10bd8c08 | 114 | ./capitaines |
d578d270 | 115 | ./ftp/jerome.nix |
53b8fad9 | 116 | ./ftp/nassime.nix |
79f239be | 117 | ./ftp/florian.nix |
dc9fb826 | 118 | ./ftp/denisejerome.nix |
c336bac4 | 119 | ./ftp/leila.nix |
f759f52e | 120 | ./ftp/immae.nix |
ce493c5d IB |
121 | ./ftp/release.nix |
122 | ./ftp/temp.nix | |
10889174 IB |
123 | ./tools/db |
124 | ./tools/tools | |
125 | ./tools/dav | |
126 | ./tools/cloud | |
127 | ./tools/git | |
35a397cd | 128 | ./tools/mastodon |
56eba416 | 129 | ./tools/mediagoblin |
a7f7fdae | 130 | ./tools/diaspora |
17146204 | 131 | ./tools/ether |
0eaac6ba | 132 | ./tools/peertube |
f8bde3d6 IB |
133 | # built using: |
134 | # sed -e "s/services\.httpd/services\.httpdProd/g" .nix-defexpr/channels/nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix | |
273e2c61 | 135 | # Removed allGranted |
f8bde3d6 | 136 | # And removed users / groups |
54307da4 IB |
137 | ./apache/httpd_prod.nix |
138 | ./apache/httpd_inte.nix | |
273e2c61 IB |
139 | # except for this one for users/groups |
140 | ./apache/httpd_tools.nix | |
10889174 IB |
141 | # Adapted from base phpfpm |
142 | ./phpfpm | |
42429ef0 IB |
143 | ]; |
144 | ||
145 | options.services.myWebsites = { | |
d68bb46b IB |
146 | production = makeServiceOptions "production"; |
147 | integration = makeServiceOptions "integration"; | |
148 | tools = makeServiceOptions "main"; | |
42429ef0 IB |
149 | |
150 | apacheConfig = lib.mkOption { | |
151 | type = lib.types.attrsOf (lib.types.submodule { | |
152 | options = { | |
153 | modules = lib.mkOption { | |
154 | type = lib.types.listOf (lib.types.str); | |
155 | default = []; | |
156 | }; | |
157 | extraConfig = lib.mkOption { | |
158 | type = lib.types.nullOr lib.types.lines; | |
159 | default = null; | |
160 | }; | |
161 | }; | |
162 | }); | |
163 | default = {}; | |
164 | description = "Extra global config"; | |
165 | }; | |
166 | ||
167 | }; | |
168 | ||
169 | config = { | |
98163486 | 170 | users.users.wwwrun.extraGroups = [ "keys" ]; |
d68bb46b | 171 | networking.firewall.allowedTCPPorts = [ 80 443 ]; |
54307da4 | 172 | |
2368a4b7 | 173 | nixpkgs.overlays = [ (self: super: rec { |
e2ca51b2 | 174 | #openssl = self.openssl_1_1; |
98584540 | 175 | php = php72; |
2368a4b7 IB |
176 | php72 = (super.php72.override { |
177 | mysql.connector-c = self.mariadb; | |
98584540 IB |
178 | config.php.mysqlnd = false; |
179 | config.php.mysqli = false; | |
180 | }).overrideAttrs(old: rec { | |
181 | # Didn't manage to build with mysqli + mysql_config connector | |
182 | configureFlags = old.configureFlags ++ [ | |
912921a7 | 183 | "--with-mysqli=shared,mysqlnd" |
98584540 IB |
184 | ]; |
185 | # preConfigure = (old.preConfigure or "") + '' | |
186 | # export CPPFLAGS="$CPPFLAGS -I${pkgs.mariadb}/include/mysql/server"; | |
187 | # sed -i -e 's/#include "mysqli_priv.h"/#include "mysqli_priv.h"\n#include <mysql_version.h>/' \ | |
188 | # ext/mysqli/mysqli.c ext/mysqli/mysqli_prop.c | |
189 | # ''; | |
190 | }); | |
2368a4b7 | 191 | phpPackages = super.php72Packages.override { inherit php; }; |
d78128ec | 192 | composerEnv = import ./commons/composer-env.nix { |
2368a4b7 | 193 | inherit (self) stdenv writeTextFile fetchurl php unzip; |
d78128ec | 194 | }; |
2368a4b7 | 195 | }) ]; |
98584540 | 196 | |
10889174 IB |
197 | services.myWebsites.tools.databases.enable = true; |
198 | services.myWebsites.tools.tools.enable = true; | |
199 | services.myWebsites.tools.dav.enable = true; | |
200 | services.myWebsites.tools.cloud.enable = true; | |
201 | services.myWebsites.tools.git.enable = true; | |
35a397cd | 202 | services.myWebsites.tools.mastodon.enable = true; |
56eba416 | 203 | services.myWebsites.tools.mediagoblin.enable = true; |
a7f7fdae | 204 | services.myWebsites.tools.diaspora.enable = true; |
17146204 | 205 | services.myWebsites.tools.etherpad-lite.enable = true; |
0eaac6ba | 206 | services.myWebsites.tools.peertube.enable = true; |
10889174 | 207 | |
42429ef0 IB |
208 | services.myWebsites.Chloe.production.enable = cfg.production.enable; |
209 | services.myWebsites.Ludivine.production.enable = cfg.production.enable; | |
210 | services.myWebsites.Aten.production.enable = cfg.production.enable; | |
211 | services.myWebsites.PiedsJaloux.production.enable = cfg.production.enable; | |
212 | services.myWebsites.Connexionswing.production.enable = cfg.production.enable; | |
d578d270 | 213 | services.myWebsites.Jerome.production.enable = cfg.production.enable; |
53b8fad9 | 214 | services.myWebsites.Nassime.production.enable = cfg.production.enable; |
79f239be | 215 | services.myWebsites.Florian.production.enable = cfg.production.enable; |
c336bac4 | 216 | services.myWebsites.Leila.production.enable = cfg.production.enable; |
dc9fb826 | 217 | services.myWebsites.DeniseJerome.production.enable = cfg.production.enable; |
9a35b8f9 | 218 | services.myWebsites.Emilia.production.enable = cfg.production.enable; |
10bd8c08 | 219 | services.myWebsites.Capitaines.production.enable = cfg.production.enable; |
f759f52e | 220 | services.myWebsites.Immae.production.enable = cfg.production.enable; |
ce493c5d IB |
221 | services.myWebsites.Release.production.enable = cfg.production.enable; |
222 | services.myWebsites.Temp.production.enable = cfg.production.enable; | |
42429ef0 IB |
223 | |
224 | services.myWebsites.Chloe.integration.enable = cfg.integration.enable; | |
225 | services.myWebsites.Ludivine.integration.enable = cfg.integration.enable; | |
226 | services.myWebsites.Aten.integration.enable = cfg.integration.enable; | |
227 | services.myWebsites.PiedsJaloux.integration.enable = cfg.integration.enable; | |
228 | services.myWebsites.Connexionswing.integration.enable = cfg.integration.enable; | |
2f0f1c48 | 229 | services.myWebsites.TellesFlorian.integration.enable = true; |
79f239be | 230 | services.myWebsites.Florian.integration.enable = true; |
42429ef0 IB |
231 | |
232 | services.myWebsites.apacheConfig = { | |
233 | gzip = { | |
234 | modules = [ "deflate" "filter" ]; | |
235 | extraConfig = '' | |
236 | AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript | |
237 | ''; | |
238 | }; | |
239 | macros = { | |
240 | modules = [ "macro" ]; | |
241 | }; | |
ce493c5d IB |
242 | stats = { |
243 | extraConfig = '' | |
244 | <Macro Stats %{domain}> | |
245 | Alias /awstats /var/lib/goaccess/%{domain} | |
246 | <Directory /var/lib/goaccess/%{domain}> | |
247 | DirectoryIndex index.html | |
248 | AllowOverride None | |
249 | Require all granted | |
250 | </Directory> | |
251 | <Location /awstats> | |
252 | Use LDAPConnect | |
253 | Require ldap-group cn=%{domain},ou=stats,cn=httpd,ou=services,dc=immae,dc=eu | |
254 | </Location> | |
255 | </Macro> | |
256 | ''; | |
257 | }; | |
42429ef0 IB |
258 | ldap = { |
259 | modules = [ "ldap" "authnz_ldap" ]; | |
9d90e7e2 | 260 | extraConfig = '' |
42429ef0 IB |
261 | <IfModule ldap_module> |
262 | LDAPSharedCacheSize 500000 | |
263 | LDAPCacheEntries 1024 | |
264 | LDAPCacheTTL 600 | |
265 | LDAPOpCacheEntries 1024 | |
266 | LDAPOpCacheTTL 600 | |
267 | </IfModule> | |
268 | ||
269 | <Macro LDAPConnect> | |
270 | <IfModule authnz_ldap_module> | |
271 | AuthLDAPURL ldap://ldap.immae.eu:389/dc=immae,dc=eu STARTTLS | |
272 | AuthLDAPBindDN cn=httpd,ou=services,dc=immae,dc=eu | |
9d90e7e2 | 273 | AuthLDAPBindPassword "${myconfig.env.httpd.ldap.password}" |
42429ef0 IB |
274 | AuthType Basic |
275 | AuthName "Authentification requise (Acces LDAP)" | |
276 | AuthBasicProvider ldap | |
277 | </IfModule> | |
278 | </Macro> | |
ce493c5d IB |
279 | ''; |
280 | }; | |
281 | global = { | |
282 | extraConfig = '' | |
646bdf3e IB |
283 | ErrorDocument 500 /maintenance_immae.html |
284 | ErrorDocument 501 /maintenance_immae.html | |
285 | ErrorDocument 502 /maintenance_immae.html | |
286 | ErrorDocument 503 /maintenance_immae.html | |
287 | ErrorDocument 504 /maintenance_immae.html | |
7da3ceec | 288 | Alias /maintenance_immae.html ${www_root}/maintenance_immae.html |
646bdf3e IB |
289 | ProxyPass /maintenance_immae.html ! |
290 | ||
7da3ceec IB |
291 | AliasMatch "(.*)/googleb6d69446ff4ca3e5.html" ${www_root}/googleb6d69446ff4ca3e5.html |
292 | <Directory ${www_root}> | |
d06ed384 IB |
293 | AllowOverride None |
294 | Require all granted | |
295 | </Directory> | |
42429ef0 IB |
296 | ''; |
297 | }; | |
ce493c5d IB |
298 | apaxy = { |
299 | extraConfig = '' | |
300 | <Macro Apaxy %{folder} %{ignored}> | |
7da3ceec IB |
301 | Alias /theme ${theme_root} |
302 | <Directory ${theme_root}> | |
ce493c5d IB |
303 | Options -Indexes |
304 | AllowOverride None | |
305 | Require all granted | |
306 | </Directory> | |
307 | ||
308 | # mod_autoindex | |
309 | <Directory %{folder}> | |
310 | Options Indexes | |
311 | AllowOverride None | |
312 | Require all granted | |
313 | ||
314 | # Inspired from Apaxy by @adamwhitcroft | |
315 | ||
316 | IndexOptions +Charset=UTF-8 +FancyIndexing +IgnoreCase +FoldersFirst +XHTML +HTMLTable +SuppressRules +SuppressDescription +NameWidth=* +IconsAreLinks +ShowForbidden | |
317 | ||
318 | IndexHeadInsert "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />" | |
319 | ||
320 | IndexIgnoreReset ON | |
321 | IndexIgnore /theme .htaccess %{ignored} | |
322 | ||
323 | AddIcon /theme/icons/blank.png ^^BLANKICON^^ | |
324 | AddIcon /theme/icons/folder.png ^^DIRECTORY^^ | |
325 | AddIcon /theme/icons/folder-home.png .. | |
326 | ||
327 | AddIconByType (TXT,/theme/icons/text.png) text/* | |
328 | AddIconByType (IMG,/theme/icons/image.png) image/* | |
329 | AddIconByType (SND,/theme/icons/audio.png) audio/* | |
330 | AddIconByType (VID,/theme/icons/video.png) video/* | |
331 | ||
332 | AddIcon /theme/icons/archive.png .7z .bz2 .cab .gz .tar | |
333 | AddIcon /theme/icons/audio.png .aac .aif .aifc .aiff .ape .au .flac .iff .m4a .mid .mp3 .mpa .ra .wav .wma .f4a .f4b .oga .ogg .xm .it .s3m .mod | |
334 | AddIcon /theme/icons/bin.png .bin .hex | |
335 | AddIcon /theme/icons/bmp.png .bmp | |
336 | AddIcon /theme/icons/c.png .c | |
337 | AddIcon /theme/icons/calc.png .xlsx .xlsm .xltx .xltm .xlam .xlr .xls .csv | |
338 | AddIcon /theme/icons/cd.png .iso | |
339 | AddIcon /theme/icons/cpp.png .cpp | |
340 | AddIcon /theme/icons/css.png .css .sass .scss | |
341 | AddIcon /theme/icons/deb.png .deb | |
342 | AddIcon /theme/icons/doc.png .doc .docx .docm .dot .dotx .dotm .log .msg .odt .pages .rtf .tex .wpd .wps | |
343 | AddIcon /theme/icons/draw.png .svg .svgz | |
344 | AddIcon /theme/icons/eps.png .ai .eps | |
345 | AddIcon /theme/icons/exe.png .exe | |
346 | AddIcon /theme/icons/gif.png .gif | |
347 | AddIcon /theme/icons/h.png .h | |
348 | AddIcon /theme/icons/html.png .html .xhtml .shtml .htm .URL .url | |
349 | AddIcon /theme/icons/ico.png .ico | |
350 | AddIcon /theme/icons/java.png .jar | |
351 | AddIcon /theme/icons/jpg.png .jpg .jpeg .jpe | |
352 | AddIcon /theme/icons/js.png .js .json | |
353 | AddIcon /theme/icons/markdown.png .md | |
354 | AddIcon /theme/icons/package.png .pkg .dmg | |
355 | AddIcon /theme/icons/pdf.png .pdf | |
356 | AddIcon /theme/icons/php.png .php .phtml | |
357 | AddIcon /theme/icons/playlist.png .m3u .m3u8 .pls .pls8 | |
358 | AddIcon /theme/icons/png.png .png | |
359 | AddIcon /theme/icons/ps.png .ps | |
360 | AddIcon /theme/icons/psd.png .psd | |
361 | AddIcon /theme/icons/py.png .py | |
362 | AddIcon /theme/icons/rar.png .rar | |
363 | AddIcon /theme/icons/rb.png .rb | |
364 | AddIcon /theme/icons/rpm.png .rpm | |
365 | AddIcon /theme/icons/rss.png .rss | |
366 | AddIcon /theme/icons/script.png .bat .cmd .sh | |
367 | AddIcon /theme/icons/sql.png .sql | |
368 | AddIcon /theme/icons/tiff.png .tiff .tif | |
369 | AddIcon /theme/icons/text.png .txt .nfo | |
370 | AddIcon /theme/icons/video.png .asf .asx .avi .flv .mkv .mov .mp4 .mpg .rm .srt .swf .vob .wmv .m4v .f4v .f4p .ogv | |
371 | AddIcon /theme/icons/xml.png .xml | |
372 | AddIcon /theme/icons/zip.png .zip | |
373 | DefaultIcon /theme/icons/default.png | |
374 | ||
375 | HeaderName /theme/header.html | |
376 | ReadmeName /theme/footer.html | |
377 | IndexStyleSheet /theme/style.css | |
378 | </Directory> | |
379 | </Macro> | |
380 | ''; | |
381 | }; | |
42429ef0 IB |
382 | http2 = { |
383 | modules = [ "http2" ]; | |
384 | extraConfig = '' | |
385 | Protocols h2 http/1.1 | |
386 | ''; | |
387 | }; | |
388 | customLog = { | |
389 | extraConfig = '' | |
390 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedVhost | |
391 | ''; | |
392 | }; | |
393 | }; | |
f8bde3d6 | 394 | |
10889174 IB |
395 | system.activationScripts = { |
396 | httpd = '' | |
397 | install -d -m 0755 /var/lib/acme/acme-challenge | |
398 | install -d -m 0750 -o wwwrun -g wwwrun /var/lib/php/sessions | |
399 | install -d -m 0750 -o wwwrun -g wwwrun /var/lib/php/sessions/adminer | |
400 | install -d -m 0750 -o wwwrun -g wwwrun /var/lib/php/sessions/mantisbt | |
401 | install -d -m 0750 -o wwwrun -g wwwrun /var/lib/php/sessions/davical | |
402 | ''; | |
403 | }; | |
404 | ||
7da3ceec IB |
405 | system.extraSystemBuilderCmds = let |
406 | adminer = pkgs.callPackage ./commons/adminer.nix {}; | |
407 | in '' | |
408 | mkdir -p $out/webapps | |
409 | ln -s ${../../www} $out/webapps/_www | |
410 | ln -s ${./apache/theme} $out/webapps/_theme | |
411 | ln -s ${adminer.webRoot} $out/webapps/${adminer.apache.webappName} | |
412 | ''; | |
413 | ||
10889174 IB |
414 | services.myPhpfpm = { |
415 | phpPackage = pkgs.php; | |
416 | phpOptions = '' | |
417 | session.save_path = "/var/lib/php/sessions" | |
95b20e17 | 418 | post_max_size = 20M |
98163486 IB |
419 | ; 15 days (seconds) |
420 | session.gc_maxlifetime = 1296000 | |
421 | ; 30 days (minutes) | |
422 | session.cache_expire = 43200 | |
10889174 IB |
423 | ''; |
424 | extraConfig = '' | |
425 | log_level = notice | |
426 | ''; | |
427 | }; | |
428 | ||
f8bde3d6 | 429 | services.httpdProd = makeService "production" config.services.myWebsites.production; |
f8d3b61a IB |
430 | services.myWebsites.production.modules = makeModules cfg; |
431 | services.myWebsites.production.extraConfig = makeExtraConfig cfg; | |
f8bde3d6 IB |
432 | |
433 | services.httpdInte = makeService "integration" config.services.myWebsites.integration; | |
f8d3b61a IB |
434 | services.myWebsites.integration.modules = makeModules cfg; |
435 | services.myWebsites.integration.extraConfig = makeExtraConfig cfg; | |
950ca5ee | 436 | |
273e2c61 | 437 | services.httpdTools = makeService "tools" config.services.myWebsites.tools; |
f8d3b61a IB |
438 | services.myWebsites.tools.modules = makeModules cfg; |
439 | services.myWebsites.tools.extraConfig = makeExtraConfig cfg ++ | |
646bdf3e IB |
440 | [ '' |
441 | RedirectMatch ^/licen[cs]es?_et_tip(ping)?$ https://www.immae.eu/licences_et_tip.html | |
442 | RedirectMatch ^/licen[cs]es?_and_tip(ping)?$ https://www.immae.eu/licenses_and_tipping.html | |
443 | RedirectMatch ^/licen[cs]es?$ https://www.immae.eu/licenses_and_tipping.html | |
444 | RedirectMatch ^/tip(ping)?$ https://www.immae.eu/licenses_and_tipping.html | |
445 | RedirectMatch ^/(mentions|mentions_legales|legal)$ https://www.immae.eu/mentions.html | |
446 | RedirectMatch ^/CGU$ https://www.immae.eu/CGU | |
447 | '' | |
448 | ] | |
449 | ; | |
42429ef0 IB |
450 | }; |
451 | } |