Skip to content
Permalink
Browse files

7815 FIX Fix URL redirect from /[site]/ to /[site]/check_mk/ in SSL s…

…etups

When an user accesses the URL <tt>/[SITE]/</tt>, the user is forwarded to the
Checkmk GUI, which is available via <tt>/[SITE]/check_mk/</tt>. In a HTTPs
setup the redirect could forward the user to a HTTP URL instead of HTTPS in
some cases.

Change-Id: Ic46b898e43d254c3127bd62c9724c1146fa0338c
  • Loading branch information
LarsMichelsen committed Jun 17, 2019
1 parent aa0c973 commit 04eaa66e29ee585335e3b484ab8ec693edce5fe0
@@ -0,0 +1,13 @@
Title: Fix URL redirect from /[site]/ to /[site]/check_mk/ in SSL setups
Level: 1
Component: multisite
Compatible: compat
Edition: cre
Version: 1.6.0b2
Date: 1560755087
Class: fix

When an user accesses the URL <tt>/[SITE]/</tt>, the user is forwarded to the
Checkmk GUI, which is available via <tt>/[SITE]/check_mk/</tt>. In a HTTPs
setup the redirect could forward the user to a HTTP URL instead of HTTPS in
some cases.
@@ -33,6 +33,7 @@ set)
cat <<EOF >$OMD_ROOT/etc/apache/listen-port.conf
# This file is managed by 'omd config set APACHE_TCP_PORT' and 'omd config set APACHE_TCP_ADDR'.
# Better do not edit manually
ServerName $APACHE_HOST:$CONFIG_APACHE_TCP_PORT
Listen $APACHE_HOST:$CONFIG_APACHE_TCP_PORT
EOF
cat <<EOF >$OMD_ROOT/etc/apache/proxy-port.conf
@@ -33,6 +33,7 @@ set)
cat <<EOF >$OMD_ROOT/etc/apache/listen-port.conf
# This file is created by 'omd config set APACHE_TCP_PORT'.
# Better do not edit manually
ServerName $CONFIG_APACHE_TCP_ADDR:$PORT
Listen $CONFIG_APACHE_TCP_ADDR:$PORT
EOF
cat <<EOF >$OMD_ROOT/etc/apache/proxy-port.conf
@@ -11,8 +11,6 @@
# own Apache access and error logs below ~/var/log/apache.
###############################################################################

ServerName 127.0.0.1

# OMD OMD OMD OMD OMD OMD OMD OMD OMD OMD OMD OMD ----------------------------
# Better do not change anything in this block or you will have to
# resolve conflicts in omd cp/mv/upate:
@@ -30,14 +28,21 @@ Include ###ROOT###/etc/apache/listen-port.conf
User ###SITE###
Group ###SITE###

# ServerName is set in listen-port.conf exactly to the Host:Port that the
# site apache is listening on. This is also the Host:Port the reverse proxy
# is working with.
# The site apache (backend server) should always report back with this
# Host:Port combination to the system apache (reverse proxy). This enables the
# system apache, which is configured using proxy-port.conf, to translate the
# URLs reported by the site apache into the public URLs of the reverse proxy.
UseCanonicalName On

# ---------------------------------------------------------------
#
# Here you can configure and tune Apache
#

ServerAdmin nobody@localhost
#ServerName www.example.com:80
UseCanonicalName Off

Timeout 120
KeepAlive On

0 comments on commit 04eaa66

Please sign in to comment.
You can’t perform that action at this time.