]> xn--ix-yja.es Git - alex.git/commitdiff
Add automatic https redirection to Proxmox proxies
authoralex <alex@pdp7.net>
Sun, 8 Oct 2023 12:22:26 +0000 (14:22 +0200)
committeralex <alex@pdp7.net>
Sun, 8 Oct 2023 12:22:26 +0000 (14:22 +0200)
personal_infra/puppet/modules/proxmox/manifests/proxy_host.pp

index 583fb5bc71cead1079db24b96e3eeba272c4fbb2..b60caf4c8bfc3176413cbcaec1e6714856a359f7 100644 (file)
@@ -13,6 +13,11 @@ define proxmox::proxy_host (String[1] $target, Optional[String[1]] $overwrite_rh
     content => @("EOT")
       MDomain $title
 
+      <VirtualHost *:80>
+        ServerName $title
+        Redirect permanent / https://$title/
+      </VirtualHost>
+
       <VirtualHost *:443>
         ServerName $title
         SSLEngine on