aboutsummaryrefslogtreecommitdiff
path: root/virtual
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-18 07:22:43 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-18 07:31:55 +0100
commit646bdf3eff9a0b154a7946bab2f0b7c459eb4165 (patch)
tree6a7fa0dac018060a9f42989cd6ed556a0a0cf724 /virtual
parent273e2c61f253bd6cbc2c564481ccf754bfc593c5 (diff)
downloadNix-646bdf3eff9a0b154a7946bab2f0b7c459eb4165.tar.gz
Nix-646bdf3eff9a0b154a7946bab2f0b7c459eb4165.tar.zst
Nix-646bdf3eff9a0b154a7946bab2f0b7c459eb4165.zip
Add some generic paths to http service
Diffstat (limited to 'virtual')
-rw-r--r--virtual/modules/websites/default.nix22
1 files changed, 21 insertions, 1 deletions
diff --git a/virtual/modules/websites/default.nix b/virtual/modules/websites/default.nix
index 55ded8a..cb3f690 100644
--- a/virtual/modules/websites/default.nix
+++ b/virtual/modules/websites/default.nix
@@ -232,6 +232,16 @@ in
232 Require ldap-group cn=%{domain},ou=stats,cn=httpd,ou=services,dc=immae,dc=eu 232 Require ldap-group cn=%{domain},ou=stats,cn=httpd,ou=services,dc=immae,dc=eu
233 </Location> 233 </Location>
234 </Macro> 234 </Macro>
235
236 ErrorDocument 500 /maintenance_immae.html
237 ErrorDocument 501 /maintenance_immae.html
238 ErrorDocument 502 /maintenance_immae.html
239 ErrorDocument 503 /maintenance_immae.html
240 ErrorDocument 504 /maintenance_immae.html
241 Alias /maintenance_immae.html ${../../www}/maintenance_immae.html
242 ProxyPass /maintenance_immae.html !
243
244 AliasMatch "(.*)/googleb6d69446ff4ca3e5.html" ${../../www}/googleb6d69446ff4ca3e5.html
235 ''; 245 '';
236 }; 246 };
237 http2 = { 247 http2 = {
@@ -281,6 +291,16 @@ in
281 291
282 services.httpdTools = makeService "tools" config.services.myWebsites.tools; 292 services.httpdTools = makeService "tools" config.services.myWebsites.tools;
283 services.myWebsites.tools.modules = pkgs.lib.lists.flatten (pkgs.lib.attrsets.mapAttrsToList (n: v: v.modules or []) cfg.apacheConfig); 293 services.myWebsites.tools.modules = pkgs.lib.lists.flatten (pkgs.lib.attrsets.mapAttrsToList (n: v: v.modules or []) cfg.apacheConfig);
284 services.myWebsites.tools.extraConfig = (builtins.filter (x: x != null) (pkgs.lib.attrsets.mapAttrsToList (n: v: v.extraConfig or null) cfg.apacheConfig)); 294 services.myWebsites.tools.extraConfig = (builtins.filter (x: x != null) (pkgs.lib.attrsets.mapAttrsToList (n: v: v.extraConfig or null) cfg.apacheConfig)) ++
295 [ ''
296 RedirectMatch ^/licen[cs]es?_et_tip(ping)?$ https://www.immae.eu/licences_et_tip.html
297 RedirectMatch ^/licen[cs]es?_and_tip(ping)?$ https://www.immae.eu/licenses_and_tipping.html
298 RedirectMatch ^/licen[cs]es?$ https://www.immae.eu/licenses_and_tipping.html
299 RedirectMatch ^/tip(ping)?$ https://www.immae.eu/licenses_and_tipping.html
300 RedirectMatch ^/(mentions|mentions_legales|legal)$ https://www.immae.eu/mentions.html
301 RedirectMatch ^/CGU$ https://www.immae.eu/CGU
302 ''
303 ]
304 ;
285 }; 305 };
286} 306}