Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-25-2004, 11:23 PM   #1
LQ Newbie
Registered: Jan 2004
Location: Columbus, OH
Posts: 19

Rep: Reputation: 0
I Fixed Apache 403 Forbidden Problem, but how?

For the past few days I've been trying to allow visitors to browse the directories on my server (Apache 2.0.48), for example a /pictures directory. I kept receiving the 403 Forbidden problem that seemed so common on these forums. I finally fixed the problem, but I still don't really know what I did to fix it. Let me start with what I did to get there.

I tried all the tips I could find on this site and others such as doing "chmod 755" on the /srv/www/htdocs/pictures directory and in fact I think I ended up doing it on every directory, but that didn't work.

I also tried adding a few lines in the .conf file that read...
<Directory "/srv/www/htdocs/pictures">
  Options Indexes FollowSymLinks
  Order allow,deny
  Allow from all
That didn't work either, still gave me the 403 Forbidden error. I should mention that I could access a file based on a direct link, but not general directory browsing.

Next I tried using a virtual host as...
  DocumentRoot "/srv/www/htdocs/"
  Options Indexes
That didn't work either, but then again I'm not exactly sure what a virtual host does.

I don't have an .htaccess file so I skipped most of the how-to's that involved that.

These settings were default in there already and I spent several hours toying around with different configurations, but never succeeded.
<Directory "/srv/www/htdocs">
  Options Indexes FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all
So finally, what I did to get it working was I added this code in...
<Location />
  Options Indexes FollowSymLinks ExecCGI
  AllowOverride None
All this time I have never seen the word Location used, I only tried it after a friend suggested changing the word Directory to Location. He was as surprised as I was that it worked because he said these were supposed to be interchangeable.

After checking the apache website for Location, I found this explanation, but it doesn't help me understand why it worked and Directory did not.

Anyway, I was looking for some help why making that switch solved my problem. More importantly though, I'm hoping this might help out others stuck with the same problem.

Old 01-26-2004, 04:07 AM   #2
Registered: Oct 2002
Location: I-Town, NY
Distribution: Debian, Slackware
Posts: 130

Rep: Reputation: 15
That is bizarre, I don't now why location would work and not directoy. By any chance, did you edit anything following IndexOptions?
Old 01-26-2004, 11:33 AM   #3
LQ Newbie
Registered: Jan 2004
Location: Columbus, OH
Posts: 19

Original Poster
Rep: Reputation: 0
I don't think so, if I don't know what it is or does, I try not to mess with it. That line reads..
IndexOptions FancyIndexing VersionSort
Is there something specific you were looking for?

I'm going to play around with Location settings like I was trying to do before with Directory and see if I can get some of the things working that I couldn't. Specifically password protected folders and user folders.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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: 403 forbidden johnty01 Linux - Networking 5 04-05-2008 03:20 PM
apache related problem (HTTP Error 403 - Forbidden ) spandau Linux - Networking 29 09-01-2005 07:06 PM
apache 403 forbidden? wezhousheng Linux - Networking 5 05-13-2005 01:15 AM
Apache 403 Forbidden mrmike Linux - Newbie 3 07-10-2004 12:31 PM
Apache 403 Forbidden quozt Linux - Networking 10 02-24-2004 05:59 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:08 AM.

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