HTTP 403 forbidden

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

HTTP 403 forbidden

Post by devilsguest »

Can you guys suggest me what to do. here today I have installed apache 2.2.24 to my linux machine. Username and password are working fine. But, after I login I see the error message saying
HTTP 403 forbidden
help please?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: HTTP 403 forbidden

Post by abrist »

Have you replaced your nagios vhost file (from the previous thread) with the default one?
What does your httpd error logs look like?

Code: Select all

tail /var/log/httpd/error_log
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

Re: HTTP 403 forbidden

Post by devilsguest »

here is my basic config file... but i don't see my log files in my /usr/local/apache2/logs.....this file looks empty

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>

abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: HTTP 403 forbidden

Post by abrist »

Is the access_log file empty as well?

Code: Select all

tail /var/log/httpd/access_log
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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: HTTP 403 forbidden

Post by lmiltchev »

Firewall issue, SELinux...?

Code: Select all

iptables -L -n
sestatus
Be sure to check out our Knowledgebase for helpful articles and solutions!
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: HTTP 403 forbidden

Post by devilsguest »

Code: Select all

[b] iptables -L -n[/b]
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
[b] sestatus[/b]
SELinux status:         enabled
SELinuxfs mount:        /selinux
Current mode:           enforcing
Mode from config file:  enforcing
Policy version:         18
Policy from config file:targeted

Policy booleans:
allow_syslog_to_console inactive
allow_ypbind            inactive
dhcpd_disable_trans     inactive
httpd_builtin_scripting active
httpd_disable_trans     inactive
httpd_enable_cgi        active
httpd_enable_homedirs   active
httpd_ssi_exec          active
httpd_tty_comm          inactive
httpd_unified           active
mysqld_disable_trans    inactive
named_disable_trans     inactive
named_write_master_zonesinactive
nscd_disable_trans      inactive
ntpd_disable_trans      inactive
pegasus_disable_trans   inactive
portmap_disable_trans   inactive
postgresql_disable_transinactive
snmpd_disable_trans     inactive
squid_disable_trans     inactive
syslogd_disable_trans   inactive
use_nfs_home_dirs       inactive
use_samba_home_dirs     inactive
use_syslogng            inactive
winbind_disable_trans   inactive
ypbind_disable_trans    inactive
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: HTTP 403 forbidden

Post by lmiltchev »

Try disabling selinux and see if this is going to change anything:

Code: Select all

setenforce 0
Be sure to check out our Knowledgebase for helpful articles and solutions!
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: HTTP 403 forbidden

Post by devilsguest »

what does it do and what is this all about....can you please explain me little precise....
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: HTTP 403 forbidden

Post by lmiltchev »

The command is used to disable selinux.

http://www.cyberciti.biz/faq/howto-turn-off-selinux/

Sometimes selinux can cause this type of issues, that's why I wanted you to disable it, and see if you will be able on view the page.
Be sure to check out our Knowledgebase for helpful articles and solutions!
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: HTTP 403 forbidden

Post by devilsguest »

when i start my apache why do i get this error any idea
httpd: Could not open configuration file /usr/local/conf/httpd.conf: No such file or directory
Locked