I'm not seeing an alias in your nagios.conf to the actual /nagios. However I am confused as your nagios.conf had nagiosxi items in it, which shouldn't be.
However, try adding the following to your /etc/httpd/conf.d/nagios.conf
I added the line to /etc/httpd/conf.d/nagios.conf, and after apache restart I am able to access <my Server>/nagios.
However, I still cannot access the username field for scheduling downtime, or achknowledging alerts. I also am unable to add the line $cfg['use_https']=true; to /usr/local/nagiosxi/html/config.inc.php.
Which other Nagiosxi items shouldn't be in my nagios.conf?
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
I can see that I got the two mixed together. I pasted in your configs. Apache would not start because the cert didn't exist. I change the name of the default CA to my certificates name for the key and the cert. Apache restarted. Nagiosxi works http or https so I added the line $cfg['use_https']=true; under $cfg['base_url']=”/nagiosxi”; in config.inc.php. Again I am getting the welcome screen, and when I click access nagiosxi the page goes white.
I also still cannot access the username field to acknowledge or schedule downtime. Perhaps I should remove all ssl configurations to see if that is causing the issue. Scheduling Downtime and Acknowledging an alert is more important to me.
I tried to do a backup on nagiosxi this morning and got this error message. I thought it might provide some insite as to the current issue.
Backing up MySQL databases...
mysqldump: Got error: 144: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!
You have new mail in /var/spool/mail/root
[root@monsrv003 ~]#
Note: If you changed your MySQL root password to something different than “nagiosxi” (the default), you will need to edit the script and
change the mysqlpass= definition found in the first few lines of the script.
Be sure to check out our Knowledgebase for helpful articles and solutions!
I did follow the documentation on Nagios XI backup, and backup has always worked in the past. I logged into mysql with the command mysql -uroot -pnagiosxi with no problems. I checked the backup script and the mysqlpass is nagiosxi. It seems like all of the issues are somehow related to username or password. I am considering restoring from a backup prior to these issues, but I wanted to make a backup of the current configuration first. If backup doesn't work I'm afraid to try a restore.
I followed the procedure and repaired the database. I had this error:
- check record delete-chain
myisamchk: warning: Found 12428 deleted space in delete link chain. Should be 12444
myisamchk: error: Found more than the expected 76 deleted rows in delete link chain
myisamchk: error: record delete-link-chain corrupted
myisamchk: error: Quick-recover aborted; Run recovery without switch 'q'
Updating MyISAM file: nagios_systemcommands.MYI
MyISAM-table 'nagios_systemcommands.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
I tried running the command again with the -f option and the backup still fails with the same error.