Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
devilsguest
Posts: 76 Joined: Wed Mar 20, 2013 7:15 pm
Location: New York
Post
by devilsguest » Mon Mar 25, 2013 11:39 am
Here is the directory in httpd.conf
Code: Select all
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory "/usr/local/nagios/sbin">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Web Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios /usr/local/nagios/share
<Directory "/usr/local/nagios/share">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Web Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Here is the .htaccess content:
Code: Select all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user
devilsguest
Posts: 76 Joined: Wed Mar 20, 2013 7:15 pm
Location: New York
Post
by devilsguest » Mon Mar 25, 2013 11:41 am
its Nagios Web Access in .htaccess files it's Nagios Access
abrist
Red Shirt
Posts: 8334 Joined: Thu Nov 15, 2012 1:20 pm
Post
by abrist » Mon Mar 25, 2013 12:26 pm
You config looks fine. When you changed the password (with htpasswd -c ...), did the web ui prompt you for your password, or did it just immediately kick you to the 401 error page?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the
Dark Side .
devilsguest
Posts: 76 Joined: Wed Mar 20, 2013 7:15 pm
Location: New York
Post
by devilsguest » Mon Mar 25, 2013 12:29 pm
It was prompting me for the pass word.
abrist
Red Shirt
Posts: 8334 Joined: Thu Nov 15, 2012 1:20 pm
Post
by abrist » Mon Mar 25, 2013 12:41 pm
If you disable auth, does it work? The causes of a "password mismatch" are few. Usually it can be traced to mistyped passwords or multiple, conflicting auth files.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the
Dark Side .
devilsguest
Posts: 76 Joined: Wed Mar 20, 2013 7:15 pm
Location: New York
Post
by devilsguest » Mon Mar 25, 2013 1:11 pm
It's kicking me with 500 Internal Server error when i disable auth_basic.
abrist
Red Shirt
Posts: 8334 Joined: Thu Nov 15, 2012 1:20 pm
Post
by abrist » Mon Mar 25, 2013 2:26 pm
Error 500 is usually due to syntax issues in vhosts or .htaccess files. You may still be declaring basic auth somewhere or require valid user, etc. You could revert the files to the way they were, and set *no* password:
Code: Select all
htpasswd /usr/local/nagios/etc/htpasswd.users nagiosadmin
Do not make a password, just press enter twice to set a blank password. Restart apache and then try to access the page. If it works, then your htaccess configuration works and you were experiencing mistypes of the password.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the
Dark Side .
devilsguest
Posts: 76 Joined: Wed Mar 20, 2013 7:15 pm
Location: New York
Post
by devilsguest » Mon Mar 25, 2013 2:44 pm
Nope. Not Working....
abrist
Red Shirt
Posts: 8334 Joined: Thu Nov 15, 2012 1:20 pm
Post
by abrist » Mon Mar 25, 2013 2:58 pm
Lets do another tail on the error_log:
Code: Select all
tail -f /usr/local/apache2/bin/httpd
Try logging in and then post the errors in a code wrap.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the
Dark Side .
devilsguest
Posts: 76 Joined: Wed Mar 20, 2013 7:15 pm
Location: New York
Post
by devilsguest » Mon Mar 25, 2013 3:06 pm
I see a something like this when i give tail -f /usr/local/apache2/bin/httpd
Code: Select all
k_apr_allocator_freeapr_file_setasideapr_memcache_incrap_cookie_removeap_hack_apr_atomic_initapr_thread_once_initap_hack_apr_thread_createap_hack_apr_procattr_dir_setap_pregsubap_hack_apr_table_overlapap_hack_apr_pollset_pollap_internal_redirect_handlerap_hack_ap_allow_optionsap_hack_ap_note_digest_auth_failureap_hack_apr_bucket_immortal_createapr_pool_clear_debugap_hack_ap_get_mime_headersap_hack_ap_run_monitorap_hack_apr_thread_mutex_trylockap_hack_ap_make_method_listap_hack_ap_run_optional_fn_retrieveap_hack_ap_custom_responseap_hack_ap_hook_get_check_configap_hack_ap_strrchr_cap_hack_apr_memcache_replaceap_rflushapr_socket_protocol_getapr_proc_mutex_pool_getapr_brigade_split_lineap_hack_apr_table_compressap_hook_get_check_configapr_dbm_freedatumapr_thread_mutex_pool_getap_expr_yy_switch_to_bufferap_hack_ap_location_walkap_hack_apr_proc_mutex_nameap_fini_vhost_configap_expr_yyerrorap_is_directoryap_pbase64encodeap_remove_input_filterap_hack_apr_uuid_parseap_send_http_traceapr_dbd_escapeapr_hook_debug_currentap_hack_ap_set_listenbacklogap_hack_ap_is_matchexpap_construct_url_IO_stdin_usedap_hack_ap_set_send_buffer_sizeap_hack_ap_pstr2_alnumap_os_create_privileged_processap_hack_ap_bucket_error_makeap_str_toupperapr_pool_initializeap_hack_ap_save_brigadeap_hack_apr_thread_rwlock_unlockap_hack_ap_process_request_internalap_escape_html2ap_walk_configap_hack_apr_strerrorap_hack_apr_procattr_user_setkill@@GLIBC_2.0apr_strtoffso_moduleap_hack_apr_bucket_file_enable_mmapap_hack_ap_expr_execap_hack_apr_md4_updateapr_mmap_dupap_hack_apr_hash_overlayap_hack_apr_table_clearap_hack_ap_strchrap_hack_ap_init_scoreboardap_hack_apr_dir_makeap_process_fnmatch_configsap_hook_get_post_configap_hack_ap_hook_get_fixupsap_hack_ap_str_toupperap_hack_apr_xlate_conv_byteap_hack_apr_pollcb_createapr_pool_cleanup_nullapr_md4_finalap_hook_drop_privilegesap_hack_ap_get_server_descriptionapr_socket_inherit_setap_hook_error_logap_rprintfgetrlimit@@GLIBC_2.2ap_hack_apr_ctimeapr_allocator_max_free_setap_hack_apr_os_pipe_putapr_pollcb_pollap_run_process_connectionap_hack_ap_hook_get_pre_mpmap_hack_apr_signal_unblockap_hack_apr_strftimeap_hack_ap_get_scoreboard_processap_hack_ap_hook_check_user_idap_hack_apr_file_inherit_unsetapr_pool_cleanup_killap_hack_ap_expr_exec_reap_proc_mutex_createap_hack_apr_versionapr_dbd_pselectap_allow_methodsap_is_matchexpap_extended_statusap_hack_apr_memcache_statsap_hack_apr_procattr_limit_setapr_uuid_parseapr_memcache_hash_defaultap_hack_apr_bucket_mmap_makepthread_sigmask@@GLIBC_2.0ap_cfg_closefileap_hack_ap_recent_ctime_exap_core_output_filterapr_thread_yieldapr_array_makeap_hack_ap_single_module_configureap_hack_ap_run_check_user_idap_hack_apr_brigade_putsap_discard_request_bodyap_hack_ap_bin2hexap_prelinked_modulesapr_memcache_addapr_os_file_getap_hack_apr_dbm_get_usednamesap_hack_apr_dbd_pqueryap_send_mmapap_hack_apr_file_open_flags_stdinap_md5ap_hack_ap_run_post_configapr_vformatterap_hack_apr_os_dir_putapr_socket_opt_setap_run_post_configapr_file_open_flags_stdinapr_md5_set_xlateap_hack_apr_memcache_find_server_hash__data_startap_rxplus_compileapr_memcache_add_multget_keyapr_getopt_initap_hack_apr_bcrypt_encodeap_hack_apr_dynamic_fn_retrieveap_hack_ap_set_listenerap_run_mpm_get_nameapr_file_open_flags_stderrap_hack_apr_array_copyapr_md5_updateap_hack_apr_collapse_spacesap_hack_ap_cookie_remove2ap_cookie_writeapr_os_thread_equalap_hack_ap_set_sub_req_protocolap_hook_get_auth_checkerap_hack_ap_is_urlap_log_cerror_ap_hack_ap_hook_get_map_to_storageap_hack_ap_random_parent_after_forkap_hack_ap_global_mutex_createapr_date_checkmaskapr_procattr_dir_setap_hack_ap_set_string_slotap_set_last_modifiedap_hack_ap_mpm_set_graceful_shutdownap_set_flag_slotap_hack_apr_signalap_hack_ap_set_content_lengthapr_allocator_createap_hack_apr_file_linkap_hack_ap_regcompap_hack_apr_mcast_leaveap_pcfg_openfileap_hack_apr_sha1_updateap_hack_apr_random_secure_readyap_hack_ap_mpm_queryapr_bucket_shared_splitapr_base64_decode_Jv_RegisterClasses__ctype_b_loc@@GLIBC_2.3ap_hack_ap_get_conn_socketapr_thread_cond_waitap_hack_apr_hash_countap_hack_apr_os_global_mutex_getap_bucket_eor_createapr_pollcb_removeapr_pool_abort_getap_run_rewrite_argsapr_os_proc_mutex_getap_hack_ap_open_stderr_logap_hack_apr_uuid_getap_hack_apr_pool_userdata_setnap_hack_ap_hook_get_pre_configap_run_auth_checkerapr_socket_timeout_setap_hack_ap_run_check_configap_hack_apr_memcache_hash_defaultap_process_child_statusap_hack_ap_piped_log_read_fdap_get_mime_headers_coreapr_proc_other_child_refreshap_hack_apr_file_open_stdinapr_brigade_vputstrsap_hack_ap_varbuf_regsubapr_hash_overlayap_hack_ap_get_conn_server_module_loglevelapr_file_datasyncap_md5digestap_show_directivesap_fflushapr_xlate_closeap_hack_apr_thread_yieldap_parse_uriap_hook_translate_nameapr_signalap_hack_apr_dbd_openap_hack_ap_run_pre_read_requestap_hack_apr_socket_addr_getapr_brigade_destroyap_set_config_vectorsap_hook_get_get_mgmt_itemsap_hack_apr_rmm_mallocap_list_provider_namesapr_pollset_method_namepcre_execapr_thread_data_setapr_dbm_fetchapr_rmm_overhead_getapr_sdbm_fetchap_bucket_type_eorapr_time_clock_hiresap_hack_ap_context_prefixap_hack_ap_method_in_listapr_base64_decode_lenapr_dbm_deleteapr_thread_pool_idle_max_getap_hack_ap_expr_str_execap_run_map_to_storageap_mpm_pod_signalapr_global_mutex_nameap_hack_ap_run_generate_log_idap_hack_apr_os_proc_mutex_putap_hack_ap_log_pidap_hack_apr_os_dso_handle_getap_byterange_filterap_hack_apr_thread_pool_scheduled_tasks_countap_hack_ap_if_walkapr_thread_rwlock_rdlockread@@GLIBC_2.0ap_hack_ap_cookie_check_stringap_hack_ap_hook_post_read_requestap_hack_apr_global_mutex_unlockap_sock_disable_nagleapr_hook_debug_enabledap_hack_apr_xml_insert_uriapr_global_mutex_destroyapr_sdbm_unlockap_hack_apr_hash_thisap_hack_ap_expr_parse_cmd_miap_max_requests_per_childap_hack_apr_thread_pool_tasks_countapr_uri_parseapr_memcache_find_server_hashap_hack_apr_filepath_rootap_hack_apr_dbm_opengeteuid@@GLIBC_2.0ap_show_modulesap_queue_initap_is_recursion_limit_exceededap_hack_ap_hook_note_auth_failureap_hack_apr_file_syncap_hack_apr_brigade_to_iovecap_hack_ap_mpm_pod_checkap_hack_ap_strcasestrap_is_rdirectoryap_hack_ap_bucket_eoc_makeap_add_common_varsap_hack_apr_rmm_freeap_hack_ap_hook_get_mpm_get_nameap_hack_ap_unixd_set_global_mutex_permsapr_dbm_get_usednames_exapr_global_mutex_pool_getap_hack_apr_md5_finalap_prelinked_module_symbolsap_hack_ap_send_http_traceap_update_child_status_from_connap_hack_ap_setup_prelinked_modulesap_hack_ap_init_rngap_hack_apr_file_renameapr_pool_userdata_getap_hack_apr_proc_waitap_hack_apr_brigade_split_lineap_hack_apr_hash_make_customap_hack_apr_dbd_get_nameap_hack_apr_queue_trypushap_hack_apr_mmap_createap_hack_ap_set_etagapr_thread_mutex_unlockap_unixd_set_global_mutex_permsap_set_file_slotap_mutex_initap_hack_ap_escape_urlencodedap_hack_apr_dbm_existsap_hack_ap_cookie_writeap_hack_ap_create_environmentap_hack_ap_mpm_pod_close__gmon_start__apr_bucket_mmap_makeapr_proc_killstrcpy@@GLIBC_2.0ap_hack_ap_field_noparamap_hack_ap_open_piped_logap_hack_apr_pstrmemdupapr_sdbm_rdonly