LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to get process status on nagios web interface (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-get-process-status-on-nagios-web-interface-4175611372/)

ali_khan786 08-05-2017 10:49 AM

Unable to get process status on nagios web interface
 
I install nagios through ssh on opensuse machine. then i try to open web interface but i got this error.

Unable to get process status

the /var/log/apache2/error_log file show me this

client denied by server configuration: /usr/local/nagios/sbin/statusjson.cgi,
referer: http://localhost:5555/nagios/main.php

the apache conf for nagios are

/etc/apache2/conf.d/nagios.conf
are

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
IfVersion < 2.3>
Order allow,deny
Allow from all
# Deny from all
# Allow from 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion>
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None

Order Allow,Deny
Allow from All
# Require all granted

# AuthName "Nagios Access"
# AuthType Basic
# AuthUserFile /usr/local/nagios/etc/htpasswd.users
# Require valid-user

I try my best to solve this error from last 2 days but nothing helps. if someone give me a tip or help how to get rid of this error. I would be thankful.

AwesomeMachine 08-05-2017 04:04 PM

Try this
 
try this:
Code:

AuthName "Nagios Access"
        AuthType Basic
        AuthUserFile /usr/local/nagios/etc/htpasswd.users
# Require valid-user
      </RequireAll>
      </IfVersion>
      IfVersion < 2.3>
          Order allow,deny
          Allow from all
    #    Deny from all
    #    Allow from 127.0.0.1

Comment out this duplication:
Code:

AuthName "Nagios Access"
      AuthType Basic
      AuthUserFile /usr/local/nagios/etc/htpasswd.users
      Require valid-user

And, did you install nagios from the opensuse package or from source?

ali_khan786 08-14-2017 02:41 AM

Solved my problem.
 
Thanks a lot AwesomeMachine. I solve my problem by removing all version from this portion. # Require valid-user. . I am very thankful to you for your response. I am extremely sorry for very late reply. .


All times are GMT -5. The time now is 06:42 AM.