]> gitweb.fluxo.info Git - puppet-apache.git/commitdiff
Switch to default.conf vhost
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Aug 2015 15:18:13 +0000 (12:18 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Aug 2015 15:18:13 +0000 (12:18 -0300)
manifests/init.pp

index d4ea4860659f6c918647f3d02a7ddbffefe33b97..2960e2ff125570e302f4c7ec62d4485f687711a2 100644 (file)
@@ -157,8 +157,14 @@ class apache(
                  "puppet:///modules/apache/icons", ]
   }
 
+  # Legacy configuration
+  file { [ "${sites}-available/default", "${sites}-enabled/000-default" ]:
+    ensure => absent,
+    notify => Service["apache"],
+  }
+
   # default site configuration
-  file { "${sites}-available/default":
+  file { "${sites}-available/default.conf":
     ensure  => present,
     content => template('apache/default.erb'),
     owner   => root,
@@ -167,6 +173,13 @@ class apache(
     notify  => Service["apache"],
   }
 
+  file { "${sites}-enabled/000-default.conf":
+    owner  => root,
+    group  => root,
+    ensure => "${sites}-available/default.conf",
+    notify => Service["apache"],
+  }
+
   # https proxy configuration
   # see http://www.metaltoad.com/blog/running-drupal-secure-pages-behind-proxy
   file { "$conf_d/https-proxy":