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 ''
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
</FilesMatch>
- <Directory ${webRoot}>
+ <Directory ${root}>
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
</Directory>
- <DirectoryMatch "${webRoot}/squelettes">
+ <DirectoryMatch "${root}/squelettes">
Require all denied
</DirectoryMatch>