X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=nixops%2Fmodules%2Fwebsites%2Fchloe%2Fchloe.nix;h=7ad23fede7c3a3d9569a3faa37b33881cd2b6700;hb=3c8d7f8706433ce0f995f3bf37fdfd348fb9e173;hp=9752db63b7f81c059100e2875a4ae3a2c97ca25a;hpb=7ebcaad53a3261d8a4aefd8a64c5c7d9d8ac2fa0;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/nixops/modules/websites/chloe/chloe.nix b/nixops/modules/websites/chloe/chloe.nix index 9752db6..7ad23fe 100644 --- a/nixops/modules/websites/chloe/chloe.nix +++ b/nixops/modules/websites/chloe/chloe.nix @@ -40,10 +40,12 @@ let pm.max_spare_servers = 3 ''}''; }; - apache = { + apache = rec { user = "wwwrun"; group = "wwwrun"; modules = [ "proxy_fcgi" ]; + webappName = "chloe_${environment}"; + root = "/run/current-system/webapps/${webappName}"; vhostConf = '' RewriteEngine On ${if environment == "prod" then '' @@ -54,16 +56,16 @@ let SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" - + DirectoryIndex index.php index.htm index.html Options -Indexes +FollowSymLinks +MultiViews +Includes - Include ${webRoot}/htaccess.txt + Include ${root}/htaccess.txt AllowOverride AuthConfig FileInfo Limit Require all granted - + Require all denied @@ -112,7 +114,7 @@ let rm -rf IMG local tmp config/remove.txt ln -sf ${../commons/spip/spip_mes_options.php} config/mes_options.php echo "Require all denied" > "config/.htaccess" - ln -sf ../../../../../${varDir}/{IMG,local} . + ln -sf ${varDir}/{IMG,local} . ''; installPhase = '' cp -a . $out