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
+ ];
};
services.websites.env.production.watchPaths = [
"/var/secrets/webapps/${chloe.app.environment}-chloe"