Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie questions: images forbidden in DocumentRoot

Status
Not open for further replies.

Hergkoff

Technical User
Dec 27, 2006
1
0
0
US
Hmm I have a hopefully simple question.. I am new to linux and webserving so I am just playing around trying to teach myself some of this stuff.. I am running the latest CentOS 4.4 with mostly default settings(everything installed from dvd, not sure the apache version but I'm sure it is fairly recent).

1: My image files do not load from the DocumentRoot (/var/ .html documents serve fine, but if I have a .png file in the directory I get a forbidden message. The permissions and ownership are exactly the same on both the file types, 644. When trying other folders images serve fine, the default aliased /icons/ and creating and aliasing an /images/ folder in the /var/www/ as well as creating a /var/ folder all work and serve the same file with the same permissions with no problems.. Is there a way to fix this, and is there a specific reason images are blocked, such as something to do with security or some sort of proper server etiquette?

2: I also get this on my forbidden page
"Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."
Is this normal? While attempting to search for an answer a few tid bits I read seemed to allude that it might be a problem. Should the following code be loading noindex.html instead? From the aliased /error/ directory (the file IS in there, and it DOES display with alternate incidents such as accessing the server through https:)?

Alias /error/ "/var/
<LocationMatch "^/$">
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>

anyways, thank you for any help you may be able to provide.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top