ConSol-Monitoring / omd

OMD - Open Monitoring Distribution Labs Edition.
http://omd.consol.de
GNU General Public License v2.0
169 stars 34 forks source link

Configure for HTTP isn't working... #176

Closed heinowalther closed 8 months ago

heinowalther commented 8 months ago

Hi there We are trying to configure our OMD site for HTTP (port 80) (own), which seems broken... We can replicate it with Ubuntu Server 22.04 LTS basis install, add the consol labs repos and install "apt install omd" which installs everything... (5.20-labs-edition) We then create a site "omd create test" before we start it, we run "omd config test" and change from "ssl" to "own". Then we run "omd start test"... We then try to browse: http://server/test/thruk/. But we cannot login... (we use the random pass we got when creating the site). We then try to su - site;set_admin_password but still nothing. We then tried the "htpasswd" manually on the ~/etc/htpasswd file... still no luck... Of cause a lot of restart of omd and the parent apache2... yet no luck... No errors in ~/var/log/apache... So kinda stuck... is there something I am missing?

lausser commented 8 months ago

You see the requests in /var/log/apache2/access.log and /omd/sites/test/var/log/apache/access_log? What about var/log/thruk.log?

heinowalther commented 8 months ago

Well here we go... hope this is useful to someone, because to me it looks "ok" ;-)

Apache2/access.log:
10.16.1.45 - - [17/Jan/2024:21:30:01 +0100] "GET /site/thruk/cgi-bin/login.cgi?nocookie&site/omd/ HTTP/1.1" 401 8985 "http://10.1.99.186/site/thruk/cgi-bin/login.cgi?nocookie&site/omd/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
10.16.1.45 - - [17/Jan/2024:21:30:08 +0100] "POST /site/thruk/cgi-bin/login.cgi HTTP/1.1" 302 815 "http://10.1.99.186/site/thruk/cgi-bin/login.cgi?nocookie&site/omd/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
10.16.1.45 - - [17/Jan/2024:21:30:08 +0100] "GET /site/omd/ HTTP/1.1" 302 619 "http://10.1.99.186/site/thruk/cgi-bin/login.cgi?nocookie&site/omd/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
10.16.1.45 - - [17/Jan/2024:21:30:08 +0100] "GET /site/thruk/cgi-bin/login.cgi?nocookie&site/omd/ HTTP/1.1" 401 8984 "http://10.1.99.186/site/thruk/cgi-bin/login.cgi?nocookie&site/omd/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"

omd..apache/access.log:
10.16.1.45 - - [17/Jan/2024:21:30:01 +0100] "GET /site/thruk/cgi-bin/login.cgi?nocookie&site/omd/ HTTP/1.1" 401 5906 "http://10.1.99.186/site/thruk/cgi-bin/login.cgi?nocookie&site/omd/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
- - - [17/Jan/2024:21:30:08 +0100] "POST /site/thruk/cgi-bin/restricted.cgi HTTP/1.1" 401 381 "-" "thruk_auth"
- - - [17/Jan/2024:21:30:08 +0100] "POST /site/thruk/cgi-bin/restricted.cgi HTTP/1.1" 401 381 "-" "thruk_auth"
- - omdadmin [17/Jan/2024:21:30:08 +0100] "POST /site/thruk/cgi-bin/restricted.cgi HTTP/1.1" 200 13 "-" "thruk_auth"
10.16.1.45 - - [17/Jan/2024:21:30:08 +0100] "POST /site/thruk/cgi-bin/login.cgi HTTP/1.1" 302 37 "http://10.1.99.186/site/thruk/cgi-bin/login.cgi?nocookie&site/omd/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
10.16.1.45 - - [17/Jan/2024:21:30:08 +0100] "GET /site/omd/ HTTP/1.1" 302 265 "http://10.1.99.186/site/thruk/cgi-bin/login.cgi?nocookie&site/omd/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
10.16.1.45 - - [17/Jan/2024:21:30:08 +0100] "GET /site/thruk/cgi-bin/login.cgi?nocookie&site/omd/ HTTP/1.1" 401 5906 "http://10.1.99.186/site/thruk/cgi-bin/login.cgi?nocookie&site/omd/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"

Thruk.log:
[2024/01/17 21:30:08][egrnmon01][INFO] [login][omdadmin][f6e5f25d67edb0017aa17b944db62cffd0dd8f491237fee4e0f9822034331a64] user login, session started (password)
sni commented 8 months ago

have you restarted the system apache after changing to own mode?

heinowalther commented 8 months ago

Yes I have. Because this is a new server I am tempted to just try a reinstall of everything, but I am pretty sure that I will end up with the same issue, because I have tried this before where I just ended up changing back to SSL again... but on this system we need port 80 ;-)

heinowalther commented 8 months ago

OK, 2nd time around did the trick... and cookies also played a role... after clearing them it seems to work. Thanks for listening and keep up the great work!