[Kimchi-devel] [PATCH] apache: Fix HTTP to HTTPS redirection

Cédric Bosdonnat posted 1 patch 6 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/kimchi tags/patchew/20170616080339.7256-1-cbosdonnat@suse.com
contrib/wok.conf.apache | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Kimchi-devel] [PATCH] apache: Fix HTTP to HTTPS redirection
Posted by Cédric Bosdonnat 6 years, 10 months ago
With the previous rewrite rule, the client is redirected to
https://localhost:8001. Use %{SERVER_NAME} instead of localhost
to keep the host name in the redirected URL.
---
 contrib/wok.conf.apache | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/wok.conf.apache b/contrib/wok.conf.apache
index c7e650ee..b4093ec7 100644
--- a/contrib/wok.conf.apache
+++ b/contrib/wok.conf.apache
@@ -30,5 +30,5 @@ Listen 8000
 	TransferLog /var/log/apache2/access_log
 
 	RewriteEngine On
-	RewriteRule ^/(.*)$           https://localhost:8001/$1 [R]
+	RewriteRule ^/(.*)$           https://%{SERVER_NAME}:8001/$1 [R]
 </VirtualHost>
-- 
2.12.2

_______________________________________________
Kimchi-devel mailing list
Kimchi-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel