404 Not Found - nagioslogserver/install - On first install

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
chpappis
Posts: 3
Joined: Mon Jul 06, 2020 2:24 am

404 Not Found - nagioslogserver/install - On first install

Post by chpappis »

Just installed nagioslogserver and when i go to http://192.168.1.2/nagioslogserver I get redirected to http://192.168.1.2/nagioslogserver/install and I get 404 Not Found.

tail /var/log/apache2/access.log

192.168.1.3 - - [06/Jul/2020:11:04:42 +0300] "GET /nagioslogserver/ HTTP/1.1" 307 608 "-" "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
192.168.1.3 - - [06/Jul/2020:11:04:42 +0300] "GET /nagioslogserver/install HTTP/1.1" 404 492 "-" "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
192.168.1.3 - - [06/Jul/2020:11:04:42 +0300] "GET /nagioslogserver/ HTTP/1.1" 307 479 "-" "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"

/var/log/apache2/error.log is empty

cat /etc/apache2/sites-available/nagioslogserver.conf

DocumentRoot /var/www/html
Alias /nagioslogserver "/var/www/html/nagioslogserver/www/"

<Directory "/var/www/html/nagioslogserver/www/">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>

RewriteEngine on
RewriteCond $1 !^(index\.php|scripts|media|app|js|css|img|font|vendor|config.js)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagioslogserver/(.*)$ /var/www/html/nagioslogserver/www/index.php/$1 [L,QSA]

There is no install folder in /var/www/html/nagioslogserver/
Only these

ls -lh /var/www/html/nagioslogserver/
total 16K
drwxr-xr-x 16 www-data www-data 4.0K Jul 3 09:40 application
-rw-r--r-- 1 root root 13 Jul 3 09:37 lsversion
drwxr-xr-x 8 root root 4.0K Jul 3 09:37 system
drwxr-xr-x 9 www-data www-data 4.0K Jul 3 09:38 www


Any ideas ?
Thank you.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: 404 Not Found - nagioslogserver/install - On first insta

Post by benjaminsmith »

Hi,

Thanks for trying out Nagios Log Server and welcome to the support forum. A couple questions to help diagnose the error. What operating system are you using and was this a clean install? In other words, a fresh system with no other applications installed.

The files you posted look similar to my test system, is the Apache webserver running?

Code: Select all

systemctl status apache2
Is port 80 open?

Code: Select all

nmap localhost -p 80
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
chpappis
Posts: 3
Joined: Mon Jul 06, 2020 2:24 am

Re: 404 Not Found - nagioslogserver/install - On first insta

Post by chpappis »

Hi,
Thanks for the response.

I am running Debian 9.12

This was not a fresh system.
There are virtual hosts installed in apache.
I am running 3 sites from these hosts, from one IP.
When I get redirected to nagioslogserver/install where should the server actually point to ? What file ?

Code: Select all

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-07-03 11:15:29 EEST; 3 days ago
  Process: 23352 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
  Process: 12685 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
  Process: 23360 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 23364 (apache2)
    Tasks: 7 (limit: 4915)
   CGroup: /system.slice/apache2.service
           ├─12712 /usr/sbin/apache2 -k start
           ├─12714 /usr/sbin/apache2 -k start
           ├─12716 /usr/sbin/apache2 -k start
           ├─12717 /usr/sbin/apache2 -k start
           ├─12718 /usr/sbin/apache2 -k start
           ├─12719 /usr/sbin/apache2 -k start
           └─23364 /usr/sbin/apache2 -k start

Jul 06 09:04:06 debian.local systemd[1]: Reloading The Apache HTTP Server.
Jul 06 09:04:07 debian.local systemd[1]: Reloaded The Apache HTTP Server.
Jul 06 10:13:23 debian.local systemd[1]: Reloading The Apache HTTP Server.
Jul 06 10:13:23 debian.local systemd[1]: Reloaded The Apache HTTP Server.

Code: Select all

Starting Nmap 7.40 ( https://nmap.org ) at 2020-07-07 08:33 EEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000084s latency).
PORT   STATE SERVICE
80/tcp open  http

Nmap done: 1 IP address (1 host up) scanned in 0.38 seconds
Thanks in advance.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: 404 Not Found - nagioslogserver/install - On first insta

Post by benjaminsmith »

Hi,

Ok,thanks for the information. We maybe able to get this working for testing out a trial, but for a production system, we recommend and support installing on a separate, clean sever. The installers are not developed to handle these custom configurations and you can run into package dependency issues with the other applications.

The DocumentRoot folder for nagios log server would be /var/www/html/nagioslogserver/www. You'll have to edit the Apache configuration file for this virtual host , so it's pointing to the right location.

I found this article for configuring this on Ubuntu that maybe helpful.
https://www.ostechnix.com/configure-apa ... tu-part-1/

Let me know if you get working.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
chpappis
Posts: 3
Joined: Mon Jul 06, 2020 2:24 am

Re: 404 Not Found - nagioslogserver/install - On first insta

Post by chpappis »

Hi , It's working.

I had to disable nagioslogserver.conf in apache.

Code: Select all

a2dissite nagioslogserver
Then add the directives from nagioslogserver.conf to my virtual host conf file so it looks like this

Code: Select all

# placeholder.name.local (etc/apache2/sites-available/placeholder.name.local.conf)
#
<VirtualHost *:80>
	ServerAdmin admin@name.local
	ServerName placeholder.name.local
	ServerAlias http://www.placeholder.name.local

	#Indexes + Directory Root
	DirectoryIndex index.php
	DocumentRoot /var/www/placeholder.name.local/public
	
	
	
	#Logfiles
	ErrorLog /var/www/placeholder.name.local/logs/error.log
	CustomLog /var/www/placeholder.name.local/logs/access.log combined
	
	Alias /nagioslogserver "/var/www/html/nagioslogserver/www/"

<Directory "/var/www/html/nagioslogserver/www/">
   Options FollowSymLinks
   AllowOverride All
   Require all granted
</Directory>

RewriteEngine on
RewriteCond $1 !^(index\.php|scripts|media|app|js|css|img|font|vendor|config.js)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagioslogserver/(.*)$ /var/www/html/nagioslogserver/www/index.php/$1 [L,QSA]
		
</VirtualHost>
Then

Code: Select all

a2ensite placeholder.name.local

Code: Select all

 systemctl reload apache2
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: 404 Not Found - nagioslogserver/install - On first insta

Post by scottwilkerson »

chpappis wrote:Hi , It's working.

I had to disable nagioslogserver.conf in apache.

Code: Select all

a2dissite nagioslogserver
Then add the directives from nagioslogserver.conf to my virtual host conf file so it looks like this

Code: Select all

# placeholder.name.local (etc/apache2/sites-available/placeholder.name.local.conf)
#
<VirtualHost *:80>
	ServerAdmin admin@name.local
	ServerName placeholder.name.local
	ServerAlias http://www.placeholder.name.local

	#Indexes + Directory Root
	DirectoryIndex index.php
	DocumentRoot /var/www/placeholder.name.local/public
	
	
	
	#Logfiles
	ErrorLog /var/www/placeholder.name.local/logs/error.log
	CustomLog /var/www/placeholder.name.local/logs/access.log combined
	
	Alias /nagioslogserver "/var/www/html/nagioslogserver/www/"

<Directory "/var/www/html/nagioslogserver/www/">
   Options FollowSymLinks
   AllowOverride All
   Require all granted
</Directory>

RewriteEngine on
RewriteCond $1 !^(index\.php|scripts|media|app|js|css|img|font|vendor|config.js)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagioslogserver/(.*)$ /var/www/html/nagioslogserver/www/index.php/$1 [L,QSA]
		
</VirtualHost>
Then

Code: Select all

a2ensite placeholder.name.local

Code: Select all

 systemctl reload apache2
Glad to hear you got it working!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked