From 35727b04e330b323ace37d8a6de9d9b264dd7e96 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@jalin.de>
Date: Thu, 07 Mar 2019 19:37:57 +0100
Subject: [PATCH] IPv6 changes

---
 hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm b/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
index 92d9faf..13b9922 100644
--- a/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
+++ b/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
@@ -4,30 +4,32 @@
 #
 
 #foreach( $pac in ${hive.webpacs} )
-<VirtualHost ${pac.curINetAddr.inetAddr}:80>
+<VirtualHost ${pac.curINetAddr.inet4Addr}:80 ${pac.curINetAddr.inet6Addr}:80>
     ServerName _
-    ServerAdmin webmaster@${pac.getName}.hostsharing.net
+    ServerAdmin webmaster@${pac.name}.hostsharing.net
 
     <Directory />
         Redirect 404 /
+        ErrorDocument 404 "No virtual host configured for this host name."
     </Directory>
 
 </VirtualHost>
 
-<VirtualHost ${pac.curINetAddr.inetAddr}:443>
+<VirtualHost ${pac.curINetAddr.inet4Addr}:443 ${pac.curINetAddr.inet6Addr}:443>
     ServerName _
-    ServerAdmin webmaster@${pac.getName}.hostsharing.net
+    ServerAdmin webmaster@${pac.name}.hostsharing.net
 
     SSLEngine On
-    SSLCertificateFile /etc/apache2/pems-enabled/${pac.getName}.crt
-    SSLCertificateKeyFile /etc/apache2/pems-enabled/${pac.getName}.key
-    SSLCertificateChainFile /etc/apache2/pems-enabled/${pac.getName}.chain
+    SSLCertificateFile /etc/apache2/pems-enabled/${pac.name}.hostsharing.net.crt
+    SSLCertificateKeyFile /etc/apache2/pems-enabled/${pac.name}.hostsharing.net.key
+    SSLCertificateChainFile /etc/apache2/pems-enabled/${pac.name}.hostsharing.net.chain
 
     <Directory />
         SSLRequireSSL On
         Redirect 404 /
+        ErrorDocument 404 "No virtual host configured for this host name."
     </Directory>
 
 </VirtualHost>
 
-#end
\ No newline at end of file
+#end

--
Gitblit v1.9.0-SNAPSHOT