Copy of existing Site wrong Apache Port 404 Not Found

CMK version:
2.1.0p9.cee
OS version:
Appliance v1.5.4
Error message:
Title: 404 Not Found
Body:

# Not Found

The requested URL was not found on this server.

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

omd status Maincopy 
agent-receiver: running
liveproxyd:     running
mknotifyd:      running
rrdcached:      running
cmc:            running
apache:         running
dcd:            running
redis:          running
crontab:        running
-----------------------
Overall state:  running

The Problem seems to be a wrong Port in the Config File /omd/apache/Maincopy.conf
In omd config Maincopy the Apache Port is 5005 and in the File it is 5000
When I change the Port everything seems to be working.
The difference to the site that i copied is that the original Site has split the Config in 3 files and this site has just one.

/omd/apache/Maincopy.conf content

# version: 2
# This file is managed by 'omd' and will automatically be overwritten. Better do not edit manually

# Make sure that symlink /omd does not make problems
<Directory />
  Options +FollowSymlinks
</Directory>

<IfModule mod_proxy_http.c>
  ProxyRequests Off
  ProxyPreserveHost On

  <Proxy http://127.0.0.1:5000/Maincopy>
    Order allow,deny
    allow from all
  </Proxy>

  <Location /Maincopy>
    # Setting "retry=0" to prevent 60 second caching of problem states e.g. when
    # the site apache is down and someone tries to access the page.
    # "disablereuse=On" prevents the apache from keeping the connection which leads to
    # wrong devlivered pages sometimes
    ProxyPass http://127.0.0.1:5000/Maincopy retry=0 disablereuse=On timeout=120
    ProxyPassReverse http://127.0.0.1:5000/Maincopy
  </Location>
</IfModule>

<IfModule !mod_proxy_http.c>
  Alias /Maincopy /omd/sites/Maincopy
  <Directory /omd/sites/Maincopy>
    Deny from all
    ErrorDocument 403 "<h1>Checkmk: Incomplete Apache Installation</h1>You need mod_proxy and
    mod_proxy_http in order to run the web interface of Checkmk."
  </Directory>
</IfModule>

<Location /Maincopy>
  ErrorDocument 503 "<meta http-equiv='refresh' content='60'><h1>Checkmk: Site Not Started</h1>You need to start this site in order to access the web interface.<!-- IE shows its own short useless error message otherwise: placeholder -->"
</Location

The /omd/apache/Main.conf contains:

Include /omd/sites/Main/etc/apache/mode.conf

/omd/sites/Main/etc/apache/mode.conf contains:

# This file is read in by the global Apache. It is 
# owned by OMD. Do not add anything here. Rather
# create your own files in conf.d/

# Make sure that symlink /omd does not make problems
<Directory />
  Options +FollowSymlinks
</Directory>

<IfModule mod_proxy_http.c>
  ProxyRequests Off
  ProxyPreserveHost On

  # Include file created by 'omd config', which 
  # sets the TCP port of the site local webserver
  Include /omd/sites/Main/etc/apache/proxy-port.conf
</IfModule>

<IfModule !mod_proxy_http.c>
  Alias /Main /omd/sites/Main
  <Directory /omd/sites/Main>
    Deny from all
    ErrorDocument 403 "<h1>OMD: Incomplete Apache2 Installation</h1>You need mod_proxy and mod_proxy_http in order to run the web interface of OMD."
  </Directory>
</IfModule>

<Location /Main>
  ErrorDocument 503 "<meta http-equiv='refresh' content='60'><h1>OMD: Site Not Started</h1>You need to start this site in order to access the web interface.<!-- IE shows its own short useless error message otherwise: placeholder                                                                                                                                                                                                                                                                                                                                                                                   -->"
</Location>

# Set site specific environment
SetEnv OMD_SITE Main
SetEnv OMD_ROOT /omd/sites/Main
SetEnv OMD_MODE own

/omd/sites/Main/etc/apache/proxy-port.conf contains:

# This file is created by 'omd config set APACHE_TCP_PORT'.
# Better do not edit manually
<IfModule mod_proxy_http.c>
  <Proxy http://127.0.0.1:5000/Main>
    Order allow,deny
    allow from all
  </Proxy>

  <Location /Main>
    # Setting "retry=0" to prevent 60 second caching of problem states e.g. when
    # the site apache is down and someone tries to access the page.
    # "disablereuse=On" prevents the apache from keeping the connection which leads to
    # wrong devlivered pages sometimes
    ProxyPass http://127.0.0.1:5000/Main retry=0 disablereuse=On timeout=120
    ProxyPassReverse http://127.0.0.1:5000/Main
  </Location

You should probably read this Werk: Fix local privilege escalation from site users

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.