[PATCH] apache: Fix HTTP to HTTPS redirection

16 Jun
2017
16 Jun
'17
11:03 a.m.
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
2971
Age (days ago)
2974
Last active (days ago)
1 comments
2 participants
participants (2)
-
Aline Manera
-
Cédric Bosdonnat