LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
LinkBack Search this Thread
Old 01-25-2004, 10:23 PM   #1
shosterman
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...
Code:
<Directory "/srv/www/htdocs/pictures">
  Options Indexes FollowSymLinks
  Order allow,deny
  Allow from all
</Directory>
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...
Code:
<VirtualHost shosterman.dyndns.org>
  DocumentRoot "/srv/www/htdocs/"
  Options Indexes
</VirtualHost>
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.
Code:
<Directory "/srv/www/htdocs">
  Options Indexes FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>
So finally, what I did to get it working was I added this code in...
Code:
<Location />
  Options Indexes FollowSymLinks ExecCGI
  AllowOverride None
</Location>
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.

Stephen
 
Old 01-26-2004, 03:07 AM   #2
fragglehorn
Member
 
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, 10:33 AM   #3
shosterman
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..
Code:
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.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache: 403 forbidden johnty01 Linux - Networking 5 04-05-2008 02:20 PM
apache related problem (HTTP Error 403 - Forbidden ) spandau Linux - Networking 29 09-01-2005 06:06 PM
apache 403 forbidden? wezhousheng Linux - Networking 5 05-13-2005 12:15 AM
Apache 403 Forbidden mrmike Linux - Newbie 3 07-10-2004 11:31 AM
Apache 403 Forbidden quozt Linux - Networking 10 02-24-2004 04:59 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration