Module: check_mk
Branch: master
Commit: ab2212af950b967bb34c48aeca5490e0ca717326
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ab2212af950b96…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 28 10:26:15 2018 +0200
6773 FIX Fixed URL redirect from /[site]/ when using custom ports
Requests to the GUI were not done correctly when a non standard port is used
for accessing the GUI. The redirect from <tt>/[site]/</tt> or
<tt>/[site]</tt>
to <tt>/[site]/check_mk/</tt> was setting the URL back to standard ports.
Change-Id: I905b696c5d28dcd4b3cefe36d2560d83ea18ae9c
---
.werks/6773 | 13 +++++++++++++
omd/packages/omd/skel/etc/apache/conf.d/omd.conf | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/6773 b/.werks/6773
new file mode 100644
index 0000000..c9cfeca
--- /dev/null
+++ b/.werks/6773
@@ -0,0 +1,13 @@
+Title: Fixed URL redirect from /[site]/ when using custom ports
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1538113544
+
+Requests to the GUI were not done correctly when a non standard port is used
+for accessing the GUI. The redirect from <tt>/[site]/</tt> or
<tt>/[site]</tt>
+to <tt>/[site]/check_mk/</tt> was setting the URL back to standard ports.
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 49949c0..607f56d 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}://%{SERVER_NAME}/###SITE###/check_mk/ [R=302]
+RewriteRule ^/###SITE###(/?|/check_mk)$ %{ENV:proto}://%{HTTP_HOST}/###SITE###/check_mk/
[R=302,L]
Alias /###SITE###/omd "###ROOT###/share/omd/htdocs"