From: alex Date: Tue, 29 Aug 2023 18:47:16 +0000 (+0000) Subject: Allow http hosts and detect https automatically X-Git-Tag: 20240214-emacs~301 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=dc69a74f8fec65e3f46d52c214e902942222efb5;p=alex.git Allow http hosts and detect https automatically --- diff --git a/personal_infra/puppet/modules/proxmox/manifests/proxy_host.pp b/personal_infra/puppet/modules/proxmox/manifests/proxy_host.pp index 658d4f4..ab0cd69 100644 --- a/personal_infra/puppet/modules/proxmox/manifests/proxy_host.pp +++ b/personal_infra/puppet/modules/proxmox/manifests/proxy_host.pp @@ -1,17 +1,26 @@ define proxmox::proxy_host (String[1] $target, Optional[String[1]] $overwrite_rh_certs = undef) { + if $target =~ /^https:/ { + $ssl_fragment = @("EOT") + SSLEngine on + SSLProxyEngine on + SSLProxyCheckPeerName off + | EOT + } + else { + $ssl_fragment = "" + } + file {"/etc/apache2/sites-enabled/$title.conf": content => @("EOT") MDomain $title ServerName $title - SSLEngine on ProxyPass "/" "$target" ProxyPassReverse "/" "$target" ProxyPreservehost On - SSLProxyEngine on - SSLProxyCheckPeerName off + $ssl_fragment | EOT ,