diff options
-rw-r--r-- | modules/private/websites/chloe/production.nix | 9 | ||||
-rw-r--r-- | modules/private/websites/ludivinecassal/production.nix | 4 | ||||
-rw-r--r-- | modules/private/websites/piedsjaloux/production.nix | 4 |
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> |