• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 527
  • Last Modified:

Apache 404 even when file exists

Ok. I'm running Apache 2.0.63 on Linux. I am trying to add aliases to the httpd.conf file to access my own content directories without any luck. Having had no success I tried to see if I could just add a file to an existing folder that is already aliased. So I added a gif to the Apache/icons folder that already has an alias. I bounced the server. I can access all the other images in the icon folder from my browser's address field but not the gif that I added. I get a 404 error. So what gives.

1) The gif I added is simply a renamed copy of a file already in the icons directory so it should not be corrupted file contents.
2) The permissions and ownership of the file I added are identical to the other files in the directory.
3) The httpd.conf file is the default httpd.conf file with the exception of the alias that I added.
4) There is no index file in the icons folder.
5) When I retrieve an index of the icons folder in the browser I get back a formatted index that contains information beyond simply a list of the icons. My test gif does not appear in the list. I can't figure out where the content from this page is coming from either.

I imagine this is some simple configuration error somewhere that I can't find due to my limited Apace experience. After hours of searching on the web I've gotten nowhere. Any help would be greatly appreciated.

Thanks.
0
sbaugher
Asked:
sbaugher
1 Solution
 
zazagorCommented:
Hi,

To me this seems like a corrupt-cache problem. Try clearing cache and rebooting.

//zaZagor
0
 
sbaugherAuthor Commented:
Is the cache in htdocs/_pages? This directory is empty.
0
 
microvbCommented:
Check /etc/httpd.conf and make sure that the path where you have the images stored is a sub-directory of your webserver (or virtual host root) directory.

Also, different "flavors" of Linux store the apache config file in different locations. Generally it is /etc/httpd.conf , or  /etc/httpd/httpd.conf ,  or  /etc/apache/httpd.conf  or another location.

Could you please attach the conf file, and state which flavor of Linux you are using as well as the version.  This would help with research into your problem.

Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now