Module: check_mk
Branch: master
Commit: 1553be8b7c72933d276fe76d1ced67306e05bfcc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1553be8b7c7293…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Oct 11 08:54:47 2018 +0200
6778 FIX Additional fix for URL redirect from /[site]/ to /[site]/check_mk/
The werk #6773 changed the behaviour of the URL redirect from
<tt>/[site]/</tt> or <tt>/[site]</tt>
to <tt>/[site]/check_mk/</tt>. The change tried to respect custom ports but
was breaking some
specific reverse proxy setups.
We have now again changed this setting to completely ignore the protocl, host and port
when producing the
redirect answer which makes the client responsible for adding the correct protocol, host
and port.
Change-Id: I81df7b425615bc32a3c2464ca82131ff0b011439
---
.werks/6778 | 16 ++++++++++++++++
omd/packages/omd/skel/etc/apache/conf.d/omd.conf | 2 +-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/6778 b/.werks/6778
new file mode 100644
index 0000000..1b4f22f
--- /dev/null
+++ b/.werks/6778
@@ -0,0 +1,16 @@
+Title: Additional fix for URL redirect from /[site]/ to /[site]/check_mk/
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1539180918
+
+The werk #6773 changed the behaviour of the URL redirect from
<tt>/[site]/</tt> or <tt>/[site]</tt>
+to <tt>/[site]/check_mk/</tt>. The change tried to respect custom ports but
was breaking some
+specific reverse proxy setups.
+
+We have now again changed this setting to completely ignore the protocl, host and port
when producing the
+redirect answer which makes the client responsible for adding the correct protocol, host
and port.
diff --git a/omd/packages/omd/skel/etc/apache/conf.d/omd.conf
b/omd/packages/omd/skel/etc/apache/conf.d/omd.conf
index 607f56d..00ef903 100644
--- a/omd/packages/omd/skel/etc/apache/conf.d/omd.conf
+++ b/omd/packages/omd/skel/etc/apache/conf.d/omd.conf
@@ -9,7 +9,7 @@ RewriteCond %{HTTP:X-Forwarded-Proto} =https [OR]
RewriteCond %{HTTPS} =on
RewriteRule ^/###SITE###(/?|/check_mk)$ - [env=proto:https]
-RewriteRule ^/###SITE###(/?|/check_mk)$ %{ENV:proto}://%{HTTP_HOST}/###SITE###/check_mk/
[R=302,L]
+RewriteRule ^/###SITE###(/?|/check_mk)$ /###SITE###/check_mk/ [R=302,L]
Alias /###SITE###/omd "###ROOT###/share/omd/htdocs"