diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2023-07-14 16:04:42 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2023-07-14 16:04:42 -0300 |
commit | d51ee6805db3463044c71db99fba5cfb3e83c536 (patch) | |
tree | 3418cb32efdfac89c0694c981aff9c8a312c1e11 | |
parent | 698dd51a63382d435857e6e41ded9d929fc0f92e (diff) | |
download | puppet-apache-d51ee6805db3463044c71db99fba5cfb3e83c536.tar.gz puppet-apache-d51ee6805db3463044c71db99fba5cfb3e83c536.tar.bz2 |
Allow for VirtualHosts in other ports
-rw-r--r-- | manifests/site.pp | 2 | ||||
-rw-r--r-- | manifests/site/config.pp | 1 | ||||
-rw-r--r-- | templates/default.erb | 3 | ||||
-rw-r--r-- | templates/site.erb | 2 |
4 files changed, 6 insertions, 2 deletions
diff --git a/manifests/site.pp b/manifests/site.pp index d0a3ff0..6afa67a 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -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, diff --git a/manifests/site/config.pp b/manifests/site/config.pp index 492ba1d..d3fdabc 100644 --- a/manifests/site/config.pp +++ b/manifests/site/config.pp @@ -15,6 +15,7 @@ define apache::site::config( $gid = '', $ssl = false, $listen = '*', + $port = $apache::http_port, $https_redirect = false, $canonical = false, $canonical_exceptions = '', diff --git a/templates/default.erb b/templates/default.erb index 9bfd2b8..3d6baaf 100644 --- a/templates/default.erb +++ b/templates/default.erb @@ -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> diff --git a/templates/site.erb b/templates/site.erb index 3bb32a2..a8ad894 100644 --- a/templates/site.erb +++ b/templates/site.erb @@ -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 %> |