Sounds like you missed the section in the docs “Authentication And Authorization In The CGIs” nagios/docs/cgiauth.html
Here is the quote from docs
"Setting Up Authenticated Users
Now that you’ve configured the web server to require authentication for access to the CGIs, you’ll need to configure users who can access the CGIs. This is done by using the htpasswd command supplied with Apache.
Running the following command will create a new file called htpasswd.users in the /usr/local/nagios/etc directory. It will also create an username/password entry for nagiosadmin. You will be asked to provide a password that will be used when nagiosadmin authenticates to the web server.
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Continue adding more users until you’ve created an account for everyone you want to access the CGIs. Use the following command to add additional users, replacing with the actual username you want to add. Note that the -c option is not used, since you already created the initial file.
Okay, so you’re done with the first part of what needs to be done. If you point your web browser to your Nagios CGIs you should be asked for a username and password. If you have problems getting user authentication to work at this point, read your webserver documentation for more info. "