aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/chloe/production.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/websites/chloe/production.nix')
-rw-r--r--modules/private/websites/chloe/production.nix10
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/private/websites/chloe/production.nix b/modules/private/websites/chloe/production.nix
index 92ae05b..c3a5732 100644
--- a/modules/private/websites/chloe/production.nix
+++ b/modules/private/websites/chloe/production.nix
@@ -9,7 +9,6 @@ let
9 varDir = "/var/lib/chloe_production"; 9 varDir = "/var/lib/chloe_production";
10 }; 10 };
11 cfg = config.myServices.websites.chloe.production; 11 cfg = config.myServices.websites.chloe.production;
12 webappdir = config.services.websites.webappDirsPaths.chloe_production;
13in { 12in {
14 options.myServices.websites.chloe.production.enable = lib.mkEnableOption "enable Chloe's website in production"; 13 options.myServices.websites.chloe.production.enable = lib.mkEnableOption "enable Chloe's website in production";
15 14
@@ -66,13 +65,12 @@ in {
66 install -m 0750 -o ${apacheUser} -g ${apacheGroup} -d ${app.varDir}/phpSessions 65 install -m 0750 -o ${apacheUser} -g ${apacheGroup} -d ${app.varDir}/phpSessions
67 ''; 66 '';
68 }; 67 };
69 services.websites.webappDirs.chloe_production = app.webRoot;
70 services.websites.env.production.modules = [ "proxy_fcgi" ]; 68 services.websites.env.production.modules = [ "proxy_fcgi" ];
71 services.websites.env.production.vhostConfs.chloe = { 69 services.websites.env.production.vhostConfs.chloe = {
72 certName = "chloe"; 70 certName = "chloe";
73 certMainHost = "osteopathe-cc.fr"; 71 certMainHost = "osteopathe-cc.fr";
74 hosts = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ]; 72 hosts = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ];
75 root = webappdir; 73 root = app.webRoot;
76 extraConfig = [ 74 extraConfig = [
77 '' 75 ''
78 Use Stats osteopathe-cc.fr 76 Use Stats osteopathe-cc.fr
@@ -90,16 +88,16 @@ in {
90 SetHandler "proxy:unix:${config.services.phpfpm.pools.chloe_production.socket}|fcgi://localhost" 88 SetHandler "proxy:unix:${config.services.phpfpm.pools.chloe_production.socket}|fcgi://localhost"
91 </FilesMatch> 89 </FilesMatch>
92 90
93 <Directory ${webappdir}> 91 <Directory ${app.webRoot}>
94 DirectoryIndex index.php index.htm index.html 92 DirectoryIndex index.php index.htm index.html
95 Options -Indexes +FollowSymLinks +MultiViews +Includes 93 Options -Indexes +FollowSymLinks +MultiViews +Includes
96 Include ${webappdir}/htaccess.txt 94 Include ${app.webRoot}/htaccess.txt
97 95
98 AllowOverride AuthConfig FileInfo Limit 96 AllowOverride AuthConfig FileInfo Limit
99 Require all granted 97 Require all granted
100 </Directory> 98 </Directory>
101 99
102 <DirectoryMatch "${webappdir}/squelettes"> 100 <DirectoryMatch "${app.webRoot}/squelettes">
103 Require all denied 101 Require all denied
104 </DirectoryMatch> 102 </DirectoryMatch>
105 103