Page 1 of 1

500 Internal Server Error and CGI:error

Posted: Wed Aug 24, 2022 12:02 am
by nurzaman
0


Yesterday my nagios was working fine, but then, the nagios interface is shown but when i clicked on the other menu it shows this error :
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache/2.4.29 (Ubuntu) Server at "My-Ip" Port 80
so i check the apache error.log and got this :

Code: Select all

[Wed Aug 24 04:07:37.923467 2022] [core:notice] [pid 7232] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 24 04:07:43.957862 2022] [cgi:error] [pid 7237] [client Client-Ip:62372] End of script output before headers: status.cgi, referer: http://My-IP/nagios/side.php
[Wed Aug 24 04:07:46.057647 2022] [cgi:error] [pid 7243] [client Client-Ip:62387] End of script output before headers: status.cgi, referer: http://My-IP/nagios/side.php
[Wed Aug 24 04:07:47.044387 2022] [cgi:error] [pid 7239] [client Client-Ip:62389] End of script output before headers: status.cgi, referer: http://My-IP/nagios/side.php
[Wed Aug 24 04:07:47.346301 2022] [cgi:error] [pid 7240] [client Client-Ip:62390] End of script output before headers: status.cgi, referer: http://My-IP/nagios/side.php
[Wed Aug 24 04:07:47.481660 2022] [cgi:error] [pid 7245] [client Client-Ip:62391] End of script output before headers: status.cgi, referer: http://My-IP/nagios/side.php
[Wed Aug 24 04:07:47.537418 2022] [cgi:error] [pid 7247] [client Client-Ip:62393] End of script output before headers: status.cgi, referer: http://My-IP/nagios/side.php
[Wed Aug 24 04:07:49.460718 2022] [cgi:error] [pid 7238] [client Client-Ip:62399] End of script output before headers: status.cgi, referer: http://My-IP/nagios/side.php
[Wed Aug 24 04:18:20.465459 2022] [cgi:error] [pid 7239] [client Client-Ip:62646] End of script output before headers: status.cgi, referer: http://My-IP/nagios/side.php
And my /etc/apache2/sites-enabled/nagios.conf

Code: Select all

# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.

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

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   <IfVersion >= 2.4.29>
      <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.4.29>
      Order allow,deny
      Allow from all
#     Order deny,allow
#     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
   <IfVersion >= 2.4.29>
      <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.4.29>
      Order allow,deny
      Allow from all
#     Order deny,allow
#     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>
any help? im still new at this