aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-24 14:00:21 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-24 14:00:21 +0100
commit33b5010fd03e27f02e97efdf9ddcb7c48ac3281c (patch)
tree9b9680826ed1d2141a7ad1680be58c78c301ded8
parent829ef7f1cb79f0171f9c5254278d93c48c44a7b5 (diff)
downloadNix-33b5010fd03e27f02e97efdf9ddcb7c48ac3281c.tar.gz
Nix-33b5010fd03e27f02e97efdf9ddcb7c48ac3281c.tar.zst
Nix-33b5010fd03e27f02e97efdf9ddcb7c48ac3281c.zip
Redirect websites landing pages
-rw-r--r--modules/private/websites/chloe/production.nix9
-rw-r--r--modules/private/websites/ludivinecassal/production.nix4
-rw-r--r--modules/private/websites/piedsjaloux/production.nix4
3 files changed, 16 insertions, 1 deletions
diff --git a/modules/private/websites/chloe/production.nix b/modules/private/websites/chloe/production.nix
index 3d267f2..578bf91 100644
--- a/modules/private/websites/chloe/production.nix
+++ b/modules/private/websites/chloe/production.nix
@@ -33,7 +33,14 @@ in {
33 certMainHost = "osteopathe-cc.fr"; 33 certMainHost = "osteopathe-cc.fr";
34 hosts = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ]; 34 hosts = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ];
35 root = chloe.apache.root; 35 root = chloe.apache.root;
36 extraConfig = [ chloe.apache.vhostConf ]; 36 extraConfig = [
37 ''
38 RewriteEngine On
39 RewriteCond "%{HTTP_HOST}" "!^www\.osteopathe-cc\.fr$" [NC]
40 RewriteRule ^(.+)$ https://www.osteopathe-cc.fr$1 [R=302,L]
41 ''
42 chloe.apache.vhostConf
43 ];
37 }; 44 };
38 services.websites.env.production.watchPaths = [ 45 services.websites.env.production.watchPaths = [
39 "/var/secrets/webapps/${chloe.app.environment}-chloe" 46 "/var/secrets/webapps/${chloe.app.environment}-chloe"
diff --git a/modules/private/websites/ludivinecassal/production.nix b/modules/private/websites/ludivinecassal/production.nix
index c6f0cf3..7cf00f0 100644
--- a/modules/private/websites/ludivinecassal/production.nix
+++ b/modules/private/websites/ludivinecassal/production.nix
@@ -85,6 +85,10 @@ in {
85 root = pcfg.webappDirs.ludivinecassal_prod; 85 root = pcfg.webappDirs.ludivinecassal_prod;
86 extraConfig = [ 86 extraConfig = [
87 '' 87 ''
88 RewriteEngine on
89 RewriteCond "%{HTTP_HOST}" "!^ludivinecassal\.com$" [NC]
90 RewriteRule ^(.+)$ https://ludivinecassal.com$1 [R=302,L]
91
88 <FilesMatch "\.php$"> 92 <FilesMatch "\.php$">
89 SetHandler "proxy:unix:${pcfg.phpListenPaths.ludivinecassal_prod}|fcgi://localhost" 93 SetHandler "proxy:unix:${pcfg.phpListenPaths.ludivinecassal_prod}|fcgi://localhost"
90 </FilesMatch> 94 </FilesMatch>
diff --git a/modules/private/websites/piedsjaloux/production.nix b/modules/private/websites/piedsjaloux/production.nix
index 28f85eb..e4e29c7 100644
--- a/modules/private/websites/piedsjaloux/production.nix
+++ b/modules/private/websites/piedsjaloux/production.nix
@@ -74,6 +74,10 @@ in {
74 root = pcfg.webappDirs.piedsjaloux_prod; 74 root = pcfg.webappDirs.piedsjaloux_prod;
75 extraConfig = [ 75 extraConfig = [
76 '' 76 ''
77 RewriteEngine on
78 RewriteCond "%{HTTP_HOST}" "!^www.piedsjaloux\.fr$" [NC]
79 RewriteRule ^(.+)$ https://www.piedsjaloux.fr$1 [R=302,L]
80
77 <FilesMatch "\.php$"> 81 <FilesMatch "\.php$">
78 SetHandler "proxy:unix:${pcfg.phpListenPaths.piedsjaloux_prod}|fcgi://localhost" 82 SetHandler "proxy:unix:${pcfg.phpListenPaths.piedsjaloux_prod}|fcgi://localhost"
79 </FilesMatch> 83 </FilesMatch>