Add Apache VirtualHost for package repository
authorJan Dittberner <jandd@cacert.org>
Fri, 2 Aug 2019 16:37:43 +0000 (18:37 +0200)
committerJan Dittberner <jandd@cacert.org>
Fri, 2 Aug 2019 16:37:43 +0000 (18:37 +0200)
sitemodules/profiles/manifests/debarchive.pp

index ed9deaf..4533a36 100644 (file)
@@ -56,6 +56,7 @@ class profiles::debarchive (
   $inoticoming_service = '/etc/systemd/system/debarchive-inoticoming.service'
 
   include profiles::base
+  include profiles::apache_common
 
   package{ ['rssh', 'reprepro', 'inoticoming']:
     ensure => latest,
@@ -304,4 +305,29 @@ class profiles::debarchive (
     enable  => true,
     require => File[$inoticoming_service],
   }
+
+  apache::vhost { 'webstatic.infra.cacert.org':
+    port              => 80,
+    docroot           => $package_dir,
+    manage_docroot    => false,
+    access_log        => true,
+    access_log_format => 'combined',
+    error_log         => true,
+    log_level         => 'warn',
+    directories       => [
+      {
+        path    => $package_dir,
+        options => ['Indexes', 'FollowSymLinks', 'Multiviews'],
+        require => 'all granted',
+      },
+      {
+        path    => "${package_dir}/db",
+        require => 'all denied',
+      },
+      {
+        path    => "${package_dir}/conf",
+        require => 'all denied',
+      },
+    ],
+  }
 }