LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-29-2007, 08:30 PM   #1
flycast
Member
 
Registered: Jul 2006
Posts: 89

Rep: Reputation: 15
Apache "Forbidden 403" on index - default install


I have a default Apache installation. When I try to acces the index at http://localhost I get:
Quote:
Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
My configuration file with comments removed has:
Quote:
<Directory "/root/httpd/prefork/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
</Directory>
There is an index.html.en file in that folder.

I have this in the config file:
Quote:
DirectoryIndex index.html index.html.var
Owner, group and others can read the file. I have searched this forum and have found lots of posts but none are my situation and none have helped me get past this. I am sure that it is a simple configuration thing I am running out of ideas.
 
Old 03-29-2007, 09:28 PM   #2
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
where u put the index.html? inside document root? /var/www/html?
 
Old 03-29-2007, 10:14 PM   #3
flycast
Member
 
Registered: Jul 2006
Posts: 89

Original Poster
Rep: Reputation: 15
There are the default files like index.html.en in
Quote:
/root/httpd/prefork/htdocs
There are also images that I have tried to request by name as well as requesting http://localhost/index.html and http://localhost/index.html.en all to no avail. Also my document root is
Quote:
DocumentRoot "/root/httpd/prefork/htdocs"

Last edited by flycast; 03-29-2007 at 10:16 PM.
 
Old 03-30-2007, 01:51 AM   #4
anon243
LQ Newbie
 
Registered: Apr 2006
Location: Szeged, Hungary
Distribution: Debian "squeeze"
Posts: 27

Rep: Reputation: 15
Hi.

Apache2 usually runs as www-data user and group and /root directory usually only can be accessed by root user so check your permissions on /root.

Why do you place your webpage there the default is /var/www.
 
Old 03-30-2007, 01:54 AM   #5
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
what distro u use? seldom see the document root under /root directory. normally a directory able to access by apache should in this permission.
foldername drwxr-xr-x
 
Old 04-01-2007, 08:56 AM   #6
flycast
Member
 
Registered: Jul 2006
Posts: 89

Original Poster
Rep: Reputation: 15
That's where mod_perl installed it.
My permissions are 777 on both the folder and all the files in theroot directory (/root/httpd/prefork/htdocs)
I am running apache as user backuppc group backuppc. The folder and files are all owned by backuppc. I have set me logging level of apache to the most verbose setting possible and all I get is the [
Quote:
Sun Apr 01 08:44:11 2007] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
 
Old 04-02-2007, 03:51 AM   #7
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
Quote:
Originally Posted by flycast
That's where mod_perl installed it.
My permissions are 777 on both the folder and all the files in theroot directory (/root/httpd/prefork/htdocs)
I am running apache as user backuppc group backuppc. The folder and files are all owned by backuppc. I have set me logging level of apache to the most verbose setting possible and all I get is the [

no matter how(setting permission 777 inside a documentroot is not a good practise), have you make sure apache user can access /root?

I afraid apache have no permission to reach /root/httpd/prefork/htdocs since he need to access /root 1st.
Regards,
Ks
 
Old 04-02-2007, 06:31 PM   #8
flycast
Member
 
Registered: Jul 2006
Posts: 89

Original Poster
Rep: Reputation: 15
I now understand what you are saying. I thought that if the folder and all it's containing files were marked 777 then it would be world readable by anybody therefore Apache could read it as well. Is this not the case?
 
Old 04-02-2007, 08:35 PM   #9
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
the question is whether apache have read/execute permission for
/root/httpd/prefork/htdocs
/root/httpd/prefork
/root/httpd
/root

or not.
 
  


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
Apache web access "Forbidden" wswartz Linux - Software 21 10-27-2011 10:52 AM
403 forbidden error on /~user/ index.php wisdom Linux - Software 10 11-17-2006 06:38 PM
Apache - "403 forbidden" message on any DIR below DocumentRoot stevod333 Linux - Software 12 06-12-2006 04:58 AM
Suse 10.1 - Apache "Access Forbidden!" on any page Danny-T Linux - Networking 4 06-01-2006 12:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:53 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