aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/websites/chloe/chloe.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-02-16 14:09:27 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-02-16 14:09:27 +0100
commite5073addbe397afd596613af469f3308a07c1801 (patch)
tree943148dbdbfb9aeeccf9c5a5d945a7398205f03d /nixops/modules/websites/chloe/chloe.nix
parenta556c4b01a536afd90042dad95e7cc09f37d4056 (diff)
downloadNix-e5073addbe397afd596613af469f3308a07c1801.tar.gz
Nix-e5073addbe397afd596613af469f3308a07c1801.tar.zst
Nix-e5073addbe397afd596613af469f3308a07c1801.zip
Move integration websites to use stable web directory
This permits to avoir having to restart httpd at each application deployment
Diffstat (limited to 'nixops/modules/websites/chloe/chloe.nix')
-rw-r--r--nixops/modules/websites/chloe/chloe.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/nixops/modules/websites/chloe/chloe.nix b/nixops/modules/websites/chloe/chloe.nix
index 9752db6..3b92af3 100644
--- a/nixops/modules/websites/chloe/chloe.nix
+++ b/nixops/modules/websites/chloe/chloe.nix
@@ -40,10 +40,12 @@ let
40 pm.max_spare_servers = 3 40 pm.max_spare_servers = 3
41 ''}''; 41 ''}'';
42 }; 42 };
43 apache = { 43 apache = rec {
44 user = "wwwrun"; 44 user = "wwwrun";
45 group = "wwwrun"; 45 group = "wwwrun";
46 modules = [ "proxy_fcgi" ]; 46 modules = [ "proxy_fcgi" ];
47 webappName = "chloe_${environment}";
48 root = "/run/current-system/webapps/${webappName}";
47 vhostConf = '' 49 vhostConf = ''
48 RewriteEngine On 50 RewriteEngine On
49 ${if environment == "prod" then '' 51 ${if environment == "prod" then ''
@@ -54,16 +56,16 @@ let
54 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" 56 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
55 </FilesMatch> 57 </FilesMatch>
56 58
57 <Directory ${webRoot}> 59 <Directory ${if environment == "dev" then root else webRoot}>
58 DirectoryIndex index.php index.htm index.html 60 DirectoryIndex index.php index.htm index.html
59 Options -Indexes +FollowSymLinks +MultiViews +Includes 61 Options -Indexes +FollowSymLinks +MultiViews +Includes
60 Include ${webRoot}/htaccess.txt 62 Include ${if environment == "dev" then root else webRoot}/htaccess.txt
61 63
62 AllowOverride AuthConfig FileInfo Limit 64 AllowOverride AuthConfig FileInfo Limit
63 Require all granted 65 Require all granted
64 </Directory> 66 </Directory>
65 67
66 <DirectoryMatch "${webRoot}/squelettes"> 68 <DirectoryMatch "${if environment == "dev" then root else webRoot}/squelettes">
67 Require all denied 69 Require all denied
68 </DirectoryMatch> 70 </DirectoryMatch>
69 71