]> gitweb.fluxo.info Git - puppet-apache.git/commitdiff
Allow for VirtualHosts in other ports
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 14 Jul 2023 19:04:42 +0000 (16:04 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 14 Jul 2023 19:04:42 +0000 (16:04 -0300)
manifests/site.pp
manifests/site/config.pp
templates/default.erb
templates/site.erb

index d0a3ff05ba596585c32596b70506125b7a27fd00..6afa67a201b761de25849e473a8af4157cade891 100644 (file)
@@ -28,6 +28,7 @@ define apache::site(
   $ssl                    = false,
   $ssl_manage_cert        = false,
   $listen                 = '*',
+  $port                   = $apache::http_port,
   $https_redirect         = false,
   $canonical              = false,
   $canonical_exceptions   = '',
@@ -107,6 +108,7 @@ define apache::site(
     gid                  => $gid,
     ssl                  => $ssl,
     listen               => $listen,
+    port                 => $port,
     https_redirect       => $https_redirect,
     canonical            => $canonical,
     canonical_exceptions => $canonical_exceptions,
index 492ba1dadd0915ee7104a935b58cea949810e558..d3fdabcda9bf37f544343a8621a6d1107bbaf0e9 100644 (file)
@@ -15,6 +15,7 @@ define apache::site::config(
   $gid                  = '',
   $ssl                  = false,
   $listen               = '*',
+  $port                 = $apache::http_port,
   $https_redirect       = false,
   $canonical            = false,
   $canonical_exceptions = '',
index 9bfd2b87443d1babcffa60ddbb9a5413f08bb392..3d6baaf328a4196db74e3f3a477d8c63f0054d8a 100644 (file)
@@ -26,5 +26,6 @@
 #
 # For additional details, check
 # https://gitlab.torproject.org/tpo/onion-services/onion-support/-/issues/30
-<VirtualHost 127.0.0.1:80>
+Listen 81
+<VirtualHost 127.0.0.1:81>
 </VirtualHost>
index 3bb32a2b6e31af5e6f84940be264e3af50a8850c..a8ad89477cdf758e6fc9a7dc86cf1aa65ef74839 100644 (file)
@@ -1,5 +1,5 @@
 # begin vhost for <%= @title %>
-<VirtualHost <%= @listen %>:<%= scope.lookupvar('apache::http_port') %>>
+<VirtualHost <%= @listen %>:<%= @port %>>
    ServerName <%= @title %>.<%= @hosting_domain %>
 <% if @server_alias != false %>   ServerAlias <%= @server_alias %><% end %>
    DocumentRoot <%= @docroot %>