]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/role/manifests/cryptoportfolio.pp
Migrate to apache
[perso/Immae/Projets/Puppet.git] / modules / role / manifests / cryptoportfolio.pp
index 0f26527e179f08f4dc078f661ec082b34e6e46ed..084419edba70087b68640f0dbdf445b58c781f8a 100644 (file)
@@ -2,6 +2,7 @@ class role::cryptoportfolio {
   include "base_installation"
 
   include "profile::postgresql"
+  include "profile::apache"
 
   $password_seed = lookup("base_installation::puppet_pass_seed") |$key| { {} }
 
@@ -47,11 +48,23 @@ class role::cryptoportfolio {
     order       => "b0",
   }
 
-  class { 'nginx': }
-
-  nginx::resource::server { $cf_front_app_host:
-    listen_port => 80,
-    proxy       => 'http://localhost:8000',
+  apache::vhost { $cf_front_app_host:
+    port                => '80',
+    docroot             => false,
+    manage_docroot      => false,
+    proxy_dest          => "http://localhost:8000",
+    proxy_preserve_host => true,
+    no_proxy_uris       => [
+      "/maintenance_immae.html",
+      "/googleb6d69446ff4ca3e5.html",
+      "/.well-known/acme-challenge"
+    ],
+    no_proxy_uris_match => [
+      '^/licen[cs]es?_et_tip(ping)?$',
+      '^/licen[cs]es?_and_tip(ping)?$',
+      '^/licen[cs]es?$',
+      '^/tip(ping)?$',
+    ]
   }
 
   user { $cf_user: