This permits to avoir having to restart httpd at each application
deployment
12 files changed:
pm.max_spare_servers = 3
''}'';
};
pm.max_spare_servers = 3
''}'';
};
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "aten_${environment}";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
vhostConf = ''
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
+ <Directory ${if environment == "dev" then root else webRoot}>
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride All
Require all granted
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride All
Require all granted
services.myPhpfpm.poolConfigs.aten_prod = aten_prod.phpFpm.pool;
system.activationScripts.aten_prod = aten_prod.activationScript;
services.myPhpfpm.poolConfigs.aten_prod = aten_prod.phpFpm.pool;
system.activationScripts.aten_prod = aten_prod.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${aten_prod.webRoot} $out/webapps/${aten_prod.apache.webappName}
+ '';
services.myWebsites.apacheConfig.aten_prod.modules = aten_prod.apache.modules;
services.myWebsites.production.modules = aten_prod.apache.modules;
services.myWebsites.production.vhostConfs.aten = {
services.myWebsites.apacheConfig.aten_prod.modules = aten_prod.apache.modules;
services.myWebsites.production.modules = aten_prod.apache.modules;
services.myWebsites.production.vhostConfs.aten = {
security.acme.certs."eldiron".extraDomains."dev.aten.pro" = null;
services.myPhpfpm.poolConfigs.aten_dev = aten_dev.phpFpm.pool;
system.activationScripts.aten_dev = aten_dev.activationScript;
security.acme.certs."eldiron".extraDomains."dev.aten.pro" = null;
services.myPhpfpm.poolConfigs.aten_dev = aten_dev.phpFpm.pool;
system.activationScripts.aten_dev = aten_dev.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${aten_dev.webRoot} $out/webapps/${aten_dev.apache.webappName}
+ '';
services.myWebsites.integration.modules = aten_dev.apache.modules;
services.myWebsites.integration.vhostConfs.aten = {
certName = "eldiron";
hosts = [ "dev.aten.pro" ];
services.myWebsites.integration.modules = aten_dev.apache.modules;
services.myWebsites.integration.vhostConfs.aten = {
certName = "eldiron";
hosts = [ "dev.aten.pro" ];
- root = aten_dev.webRoot;
+ root = aten_dev.apache.root;
extraConfig = [ aten_dev.apache.vhostConf ];
};
})
extraConfig = [ aten_dev.apache.vhostConf ];
};
})
pm.max_spare_servers = 3
''}'';
};
pm.max_spare_servers = 3
''}'';
};
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "chloe_${environment}";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
RewriteEngine On
${if environment == "prod" then ''
vhostConf = ''
RewriteEngine On
${if environment == "prod" then ''
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
</FilesMatch>
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
</FilesMatch>
+ <Directory ${if environment == "dev" then root else webRoot}>
DirectoryIndex index.php index.htm index.html
Options -Indexes +FollowSymLinks +MultiViews +Includes
DirectoryIndex index.php index.htm index.html
Options -Indexes +FollowSymLinks +MultiViews +Includes
- Include ${webRoot}/htaccess.txt
+ Include ${if environment == "dev" then root else webRoot}/htaccess.txt
AllowOverride AuthConfig FileInfo Limit
Require all granted
</Directory>
AllowOverride AuthConfig FileInfo Limit
Require all granted
</Directory>
- <DirectoryMatch "${webRoot}/squelettes">
+ <DirectoryMatch "${if environment == "dev" then root else webRoot}/squelettes">
Require all denied
</DirectoryMatch>
Require all denied
</DirectoryMatch>
extension=${pkgs.php}/lib/php/extensions/mysqli.so
'';
system.activationScripts.chloe_prod = chloe_prod.activationScript;
extension=${pkgs.php}/lib/php/extensions/mysqli.so
'';
system.activationScripts.chloe_prod = chloe_prod.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${chloe_prod.webRoot} $out/webapps/${chloe_prod.apache.webappName}
+ '';
services.myWebsites.production.modules = chloe_prod.apache.modules;
services.myWebsites.production.vhostConfs.chloe = {
certName = "chloe";
services.myWebsites.production.modules = chloe_prod.apache.modules;
services.myWebsites.production.vhostConfs.chloe = {
certName = "chloe";
extension=${pkgs.php}/lib/php/extensions/mysqli.so
'';
system.activationScripts.chloe_dev = chloe_dev.activationScript;
extension=${pkgs.php}/lib/php/extensions/mysqli.so
'';
system.activationScripts.chloe_dev = chloe_dev.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${chloe_dev.webRoot} $out/webapps/${chloe_dev.apache.webappName}
+ '';
services.myWebsites.integration.modules = chloe_dev.apache.modules;
services.myWebsites.integration.vhostConfs.chloe = {
certName = "eldiron";
hosts = ["chloe.immae.eu" ];
services.myWebsites.integration.modules = chloe_dev.apache.modules;
services.myWebsites.integration.vhostConfs.chloe = {
certName = "eldiron";
hosts = ["chloe.immae.eu" ];
- root = chloe_dev.webRoot;
+ root = chloe_dev.apache.root;
extraConfig = [ chloe_dev.apache.vhostConf ];
};
})
extraConfig = [ chloe_dev.apache.vhostConf ];
};
})
pm.max_spare_servers = 3
''}'';
};
pm.max_spare_servers = 3
''}'';
};
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "connexionswing_${environment}";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
vhostConf = ''
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://connexionswing.com\"></html>"
</Location>
ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://connexionswing.com\"></html>"
</Location>
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
Require all granted
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
Require all granted
services.myPhpfpm.poolConfigs.connexionswing_prod = connexionswing_prod.phpFpm.pool;
services.myPhpfpm.poolPhpConfigs.connexionswing_prod = connexionswing_prod.phpFpm.phpConfig;
system.activationScripts.connexionswing_prod = connexionswing_prod.activationScript;
services.myPhpfpm.poolConfigs.connexionswing_prod = connexionswing_prod.phpFpm.pool;
services.myPhpfpm.poolPhpConfigs.connexionswing_prod = connexionswing_prod.phpFpm.phpConfig;
system.activationScripts.connexionswing_prod = connexionswing_prod.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${connexionswing_prod.webRoot} $out/webapps/${connexionswing_prod.apache.webappName}
+ '';
services.myWebsites.production.modules = connexionswing_prod.apache.modules;
services.myWebsites.production.vhostConfs.connexionswing = {
certName = "connexionswing";
services.myWebsites.production.modules = connexionswing_prod.apache.modules;
services.myWebsites.production.vhostConfs.connexionswing = {
certName = "connexionswing";
services.myPhpfpm.poolConfigs.connexionswing_dev = connexionswing_dev.phpFpm.pool;
services.myPhpfpm.poolPhpConfigs.connexionswing_dev = connexionswing_dev.phpFpm.phpConfig;
system.activationScripts.connexionswing_dev = connexionswing_dev.activationScript;
services.myPhpfpm.poolConfigs.connexionswing_dev = connexionswing_dev.phpFpm.pool;
services.myPhpfpm.poolPhpConfigs.connexionswing_dev = connexionswing_dev.phpFpm.phpConfig;
system.activationScripts.connexionswing_dev = connexionswing_dev.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${connexionswing_dev.webRoot} $out/webapps/${connexionswing_dev.apache.webappName}
+ '';
services.myWebsites.integration.modules = connexionswing_dev.apache.modules;
services.myWebsites.integration.vhostConfs.connexionswing = {
certName = "eldiron";
hosts = ["connexionswing.immae.eu" "sandetludo.immae.eu" ];
services.myWebsites.integration.modules = connexionswing_dev.apache.modules;
services.myWebsites.integration.vhostConfs.connexionswing = {
certName = "eldiron";
hosts = ["connexionswing.immae.eu" "sandetludo.immae.eu" ];
- root = connexionswing_dev.webRoot;
+ root = connexionswing_dev.apache.root;
extraConfig = [ connexionswing_dev.apache.vhostConf ];
};
})
extraConfig = [ connexionswing_dev.apache.vhostConf ];
};
})
services.myPhpfpm.poolConfigs.ludivinecassal_prod = ludivinecassal_prod.phpFpm.pool;
system.activationScripts.ludivinecassal_prod = ludivinecassal_prod.activationScript;
services.myPhpfpm.poolConfigs.ludivinecassal_prod = ludivinecassal_prod.phpFpm.pool;
system.activationScripts.ludivinecassal_prod = ludivinecassal_prod.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${ludivinecassal_prod.webRoot} $out/webapps/${ludivinecassal_prod.apache.webappName}
+ '';
services.myWebsites.production.modules = ludivinecassal_prod.apache.modules;
services.myWebsites.production.vhostConfs.ludivine = {
certName = "ludivinecassal";
services.myWebsites.production.modules = ludivinecassal_prod.apache.modules;
services.myWebsites.production.vhostConfs.ludivine = {
certName = "ludivinecassal";
services.myPhpfpm.poolConfigs.ludivinecassal_dev = ludivinecassal_dev.phpFpm.pool;
system.activationScripts.ludivinecassal_dev = ludivinecassal_dev.activationScript;
services.myPhpfpm.poolConfigs.ludivinecassal_dev = ludivinecassal_dev.phpFpm.pool;
system.activationScripts.ludivinecassal_dev = ludivinecassal_dev.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${ludivinecassal_dev.webRoot} $out/webapps/${ludivinecassal_dev.apache.webappName}
+ '';
services.myWebsites.apacheConfig.ludivinecassal_dev.modules = ludivinecassal_dev.apache.modules;
services.myWebsites.integration.modules = ludivinecassal_dev.apache.modules;
services.myWebsites.integration.vhostConfs.ludivine = {
certName = "eldiron";
hosts = [ "ludivine.immae.eu" ];
services.myWebsites.apacheConfig.ludivinecassal_dev.modules = ludivinecassal_dev.apache.modules;
services.myWebsites.integration.modules = ludivinecassal_dev.apache.modules;
services.myWebsites.integration.vhostConfs.ludivine = {
certName = "eldiron";
hosts = [ "ludivine.immae.eu" ];
- root = ludivinecassal_dev.webRoot;
+ root = ludivinecassal_dev.apache.root;
extraConfig = [ ludivinecassal_dev.apache.vhostConf ];
};
})
extraConfig = [ ludivinecassal_dev.apache.vhostConf ];
};
})
pm.max_spare_servers = 3
''}'';
};
pm.max_spare_servers = 3
''}'';
};
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "ludivine_${environment}";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
vhostConf = ''
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://ludivinecassal.com\"></html>"
</Location>
ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://ludivinecassal.com\"></html>"
</Location>
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
Require all granted
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
Require all granted
services.myPhpfpm.poolConfigs.piedsjaloux_prod = piedsjaloux_prod.phpFpm.pool;
system.activationScripts.piedsjaloux_prod = piedsjaloux_prod.activationScript;
services.myPhpfpm.poolConfigs.piedsjaloux_prod = piedsjaloux_prod.phpFpm.pool;
system.activationScripts.piedsjaloux_prod = piedsjaloux_prod.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${piedsjaloux_prod.webRoot} $out/webapps/${piedsjaloux_prod.apache.webappName}
+ '';
services.myWebsites.production.modules = piedsjaloux_prod.apache.modules;
services.myWebsites.production.vhostConfs.piedsjaloux = {
certName = "piedsjaloux";
services.myWebsites.production.modules = piedsjaloux_prod.apache.modules;
services.myWebsites.production.vhostConfs.piedsjaloux = {
certName = "piedsjaloux";
security.acme.certs."eldiron".extraDomains."piedsjaloux.immae.eu" = null;
services.myPhpfpm.poolConfigs.piedsjaloux_dev = piedsjaloux_dev.phpFpm.pool;
system.activationScripts.piedsjaloux_dev = piedsjaloux_dev.activationScript;
security.acme.certs."eldiron".extraDomains."piedsjaloux.immae.eu" = null;
services.myPhpfpm.poolConfigs.piedsjaloux_dev = piedsjaloux_dev.phpFpm.pool;
system.activationScripts.piedsjaloux_dev = piedsjaloux_dev.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${piedsjaloux_dev.webRoot} $out/webapps/${piedsjaloux_dev.apache.webappName}
+ '';
services.myWebsites.integration.modules = piedsjaloux_dev.apache.modules;
services.myWebsites.integration.vhostConfs.piedsjaloux = {
certName = "eldiron";
hosts = [ "piedsjaloux.immae.eu" ];
services.myWebsites.integration.modules = piedsjaloux_dev.apache.modules;
services.myWebsites.integration.vhostConfs.piedsjaloux = {
certName = "eldiron";
hosts = [ "piedsjaloux.immae.eu" ];
- root = piedsjaloux_dev.webRoot;
+ root = piedsjaloux_dev.apache.root;
extraConfig = [ piedsjaloux_dev.apache.vhostConf ];
};
})
extraConfig = [ piedsjaloux_dev.apache.vhostConf ];
};
})
pm.max_spare_servers = 3
''}'';
};
pm.max_spare_servers = 3
''}'';
};
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "piedsjaloux_${environment}";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
vhostConf = ''
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://piedsjaloux.fr\"></html>"
</Location>
ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://piedsjaloux.fr\"></html>"
</Location>
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
Require all granted
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
Require all granted
security.acme.certs."eldiron".extraDomains."app.tellesflorian.com" = null;
services.myPhpfpm.poolConfigs.tellesflorian_dev = tellesflorian_dev.phpFpm.pool;
system.activationScripts.tellesflorian_dev = tellesflorian_dev.activationScript;
security.acme.certs."eldiron".extraDomains."app.tellesflorian.com" = null;
services.myPhpfpm.poolConfigs.tellesflorian_dev = tellesflorian_dev.phpFpm.pool;
system.activationScripts.tellesflorian_dev = tellesflorian_dev.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${tellesflorian_dev.webRoot} $out/webapps/${tellesflorian_dev.apache.webappName}
+ '';
services.myWebsites.integration.modules = adminer.apache.modules ++ tellesflorian_dev.apache.modules;
services.myWebsites.integration.vhostConfs.tellesflorian = {
certName = "eldiron";
hosts = ["app.tellesflorian.com" ];
services.myWebsites.integration.modules = adminer.apache.modules ++ tellesflorian_dev.apache.modules;
services.myWebsites.integration.vhostConfs.tellesflorian = {
certName = "eldiron";
hosts = ["app.tellesflorian.com" ];
- root = tellesflorian_dev.webRoot;
+ root = tellesflorian_dev.apache.root;
extraConfig = [
tellesflorian_dev.apache.vhostConf
adminer.apache.vhostConf
extraConfig = [
tellesflorian_dev.apache.vhostConf
adminer.apache.vhostConf
passwords = writeText "tellesflorian_passwords" ''
invite:${config.invite_passwords}
'';
passwords = writeText "tellesflorian_passwords" ''
invite:${config.invite_passwords}
'';
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "florian_${environment}";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
vhostConf = ''
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://tellesflorian.com\"></html>"
</Location>
ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://tellesflorian.com\"></html>"
</Location>
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
Require all granted
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
Require all granted
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride All
Require all granted
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride All
Require all granted