systemd.services.phpfpm-chloe_prod.after = lib.mkAfter chloe.phpFpm.serviceDeps;
systemd.services.phpfpm-chloe_prod.wants = chloe.phpFpm.serviceDeps;
services.phpfpm.pools.chloe_prod = {
- listen = chloe.phpFpm.socket;
- extraConfig = chloe.phpFpm.pool;
+ user = config.services.httpd.Prod.user;
+ group = config.services.httpd.Prod.group;
+ settings = chloe.phpFpm.pool;
phpOptions = config.services.phpfpm.phpOptions + ''
extension=${pkgs.php}/lib/php/extensions/mysqli.so
'';
certMainHost = "osteopathe-cc.fr";
hosts = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ];
root = chloe.apache.root;
- extraConfig = [ chloe.apache.vhostConf ];
+ extraConfig = [
+ ''
+ RewriteEngine On
+ RewriteCond "%{HTTP_HOST}" "!^www\.osteopathe-cc\.fr$" [NC]
+ RewriteRule ^(.+)$ https://www.osteopathe-cc.fr$1 [R=302,L]
+ ''
+ (chloe.apache.vhostConf config.services.phpfpm.pools.chloe_prod.socket)
+ ];
};
services.websites.env.production.watchPaths = [
"/var/secrets/webapps/${chloe.app.environment}-chloe"