Page 1 of 1

Apache Digest authentication

Posted: Sat Jun 21, 2025 8:13 pm
by Travis Bean
The specific steps I took that caused me to encounter the problem with authentication:

1. Configure /etc/nagios4/cgi.cfg to use_authentication=1.
2. sudo htdigest -c /etc/apache2/.htdigest.users "Digest Authentication" admin
3. Copy the following apache2.conf to /etc/nagios4: https://docs.google.com/document/d/1BmN ... sp=sharing
4. sudo ln -fs /etc/nagios4/apache2.conf /etc/apache2/conf-available/nagios-cgi.conf (This symlink is missing and should be enabled by default.)
5. sudo systemctl restart apache2
6. Access localhost/nagios4 through a web browser.

I expected a login prompt, but it did not appear.

use_authentication=1 is the default setting for /etc/nagios4/cgi.cfg. This appears to be broken and set to use_authentication=0 regardless of the setting.

By the way, I tested this configuration on Ubuntu Server 24.04.

Re: Apache Digest authentication

Posted: Tue Jul 01, 2025 4:32 pm
by bbahn
Hello Travis Bean,

I will file an issue and we will investigate this matter.

Re: Apache Digest authentication

Posted: Tue Jul 08, 2025 6:38 am
by gerougee999
Your Nagios4 login prompt issue on Ubuntu Server 24.04 likely stems from Apache not correctly loading your authentication configuration. The most probable fix is to ensure your `nagios-cgi.conf` is **enabled in Apache** using `sudo a2enconf nagios-cgi.conf` followed by a restart of Apache. Also, verify no conflicting Apache configs are active and that your custom config's directives are correctly formatted.