views:

22

answers:

3

I'm having trouble with my Apache Web Server. I have a folder (htdocs\images) where I have a number of images already in place. I can browse them and see them on my web server (and access them via HTML). I added a new image in there today, and went to browse to it, and it can't be found. I double and triple checked the path and everything. I even restarted Apache and that didn't seem to help.

I'm really confused as to what's going on here. Anybody have any suggestions?

Thank you.

Edit I just turned on the ability for the images directory to be listed, browsed to it (http://127.0.0.1/images/) and I was able to see all the previous images that were in the folder, but not the new one.

A: 

make sure the caSE and spelling are 100% correct.

Robert French
Space characters in the filename might also mess with Apache
Ian Clelland
A: 

There is not magic in programming (some may disagree:), so look for silly errors. Wrong server? Case of your letters? Wrong extension?

Ilya Biryukov
That's what's making me so crazy. I go from this (in HTML):images\picture1.pngto thisimages\picture2.pngpicture1 shows, picture2 does not. Nothing else different other than I just dropped picture2.png into the images folder.
JasCav
+2  A: 

Turn directory indexes on for htdocs\images, remove (or move out of the way) any index.* files, and point your browser at http://yoursite/images/

That should give you a full listing of files in that directory. If the file you're looking for isn't there, then Apache is looking at a different directory than you think it is. You'll have to search your httpd.conf for clues -- DocumentRoot, Alias, AliasMatch, Redirect, RedirectMatch, RewriteRule -- there are probably dozens of apache directives that could be causing the web server to get its documents from somewhere other than where you think it's looking.

Ian Clelland
This was pretty much the problem. I delved back into httpd.conf and found someone had set an alias to point to a different location. How confusing. Thanks!
JasCav