LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-20-2005, 05:55 AM   #1
hrajabi
LQ Newbie
 
Registered: Aug 2005
Location: Iran/Tehran
Distribution: Fedora core 3
Posts: 11

Rep: Reputation: 0
Forbidden error in httpd


hi every body,
I would like to run apache server .
My document root is /var/www/html/
and i have a index.php file in this path: /var/www/html/cacti
when i want to see the page that put http://172.16.1.230/cacti
I envisage the forbbiden error.
I have changed the cacti mod to 755 but this problem has not been solved.
and the httpd service was running.

Please Help me.
 
Old 10-20-2005, 06:10 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Check your httpd.conf for the "DirectoryIndex" directive.
You have to add "index.php" and restart apache.
 
Old 10-20-2005, 06:37 AM   #3
hrajabi
LQ Newbie
 
Registered: Aug 2005
Location: Iran/Tehran
Distribution: Fedora core 3
Posts: 11

Original Poster
Rep: Reputation: 0
that 's right,
but I have added it already and restarted apache.
 
Old 10-20-2005, 07:02 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
What happens if you give: http://172.16.1.230/cacti/index.php
Also take a look at the apache error_log to see if you find out what the problem is.
 
Old 10-21-2005, 03:35 AM   #5
hrajabi
LQ Newbie
 
Registered: Aug 2005
Location: Iran/Tehran
Distribution: Fedora core 3
Posts: 11

Original Poster
Rep: Reputation: 0
the error log:access denied
and http://172.16.1.230/cacti/index.php ,exist the same as error,Forbidden.
 
Old 10-21-2005, 04:01 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Is it a 401 or 403 error? Post here the relevant lines from your error_log and access_log to see what is the error number.
What happens if you put a plain index.html in that directory?
Also what distro are you using?
 
Old 10-21-2005, 04:03 AM   #7
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
What are the permissions on "/var/www/html/cacti/index.php"? What are the permissions on "/var/www/html/"? Have you used PHPs successfully on this server before?
 
Old 10-21-2005, 03:01 PM   #8
hrajabi
LQ Newbie
 
Registered: Aug 2005
Location: Iran/Tehran
Distribution: Fedora core 3
Posts: 11

Original Poster
Rep: Reputation: 0
what should i do in this respect?
do i have to do anything special about php?
I installed the php rpm on my server ,that's it.and start it with apache service.
 
Old 10-22-2005, 01:36 AM   #9
hrajabi
LQ Newbie
 
Registered: Aug 2005
Location: Iran/Tehran
Distribution: Fedora core 3
Posts: 11

Original Poster
Rep: Reputation: 0
Dear Bathory

I use Fedora Core 3 distribution,
error number is :403
the access_log errors are the following,when i try to see ttp://172.16.1.230/cacti/index.php

172.16.1.230 - - [22/Oct/2005:09:42:00 -0400] "GET /cacti/index.php HTTP/1.1" 403 414 "-" "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020 Firefox/0.10.1"
172.16.1.230 - - [22/Oct/2005:09:42:00 -0400] "GET /favicon.ico HTTP/1.1" 404 287 "-" "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020 Firefox/0.10.1"
~
the relevant error_log about access index.php:
[Sat Oct 22 09:29:52 2005] [error] [client 172.16.1.5] (13)Permission denied: access to /cacti/index.php denied
[Sat Oct 22 09:36:14 2005] [error] [client 172.16.1.5] (13)Permission denied: access to /cacti/index.php denied
[Sat Oct 22 09:41:54 2005] [error] [client 172.16.1.230] (13)Permission denied: access to /cacti/index.php denied
[Sat Oct 22 09:41:54 2005] [error] [client 172.16.1.230] File does not exist: /var/www/html/favicon.ico
[Sat Oct 22 09:42:00 2005] [error] [client 172.16.1.230] (13)Permission denied: access to /cacti/index.php denied
[Sat Oct 22 09:42:00 2005] [error] [client 172.16.1.230] File does not exist: /var/www/html/favicon.ico

and when I include the index.html to cacti directory ,there is not any problem and the page can be display.
 
Old 10-22-2005, 08:23 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
[Sat Oct 22 09:41:54 2005] [error] [client 172.16.1.230] (13)Permission denied: access to /cacti/index.php denied
[Sat Oct 22 09:41:54 2005] [error] [client 172.16.1.230] File does not exist: /var/www/html/favicon.ico
There's something wrong with your config since apache looks under /cacti and not under /var/www/html/cacti. Thus the 403 error. Perhaps you have something like:
Code:
 Alias /cacti "/"
 
Old 10-24-2005, 02:35 AM   #11
hrajabi
LQ Newbie
 
Registered: Aug 2005
Location: Iran/Tehran
Distribution: Fedora core 3
Posts: 11

Original Poster
Rep: Reputation: 0
Dear Bathory,


I checked the directory that is Document root :/var/www/html/
and /var/www/html/cacti is the path that i used for this software.
i think that this problem is not under /cacti ,because when i set the index.html this path there is not any problem and the page be displayed.


thanks alot.
 
Old 10-24-2005, 03:03 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Then it should be SELinux!!!. Read this to see what you have to do.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting httpd: /usr/sbin/httpd: symbol lookup error: /usr/local/lib/libaprutil-0.so. bijuhpd Linux - Newbie 1 10-30-2005 05:07 PM
HTTPD ERROR: FORBIDDEN (rh 9.0) swatward Linux - Software 1 02-27-2005 06:52 PM
forbidden error? cz1179 Linux - General 1 01-05-2005 05:59 PM
Vqadmin.cgi, 403 Forbidden Erros, and httpd.conf woe opioid Linux - Software 3 05-11-2004 08:08 AM
403 forbidden access on httpd service roguecoolman Linux - Newbie 1 09-23-2003 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration