Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

There is a problem with apache2. It does not let me see images in a spesific directory. There are images in for instance directory X and Y. I have uploaded new ones and all of a sudden Apache started to say "Error 404" to files at X but it shows the files in Y. I could not solve it. I have already restarted the apache.

I cannot find how to solve it :(

share|improve this question
    
Can you be more specific, show some logs, give names of directories and what you did exactly? –  ℝaphink Dec 28 '09 at 11:33
    
Please provide logs, configuration, and any .htaccess files you may have. –  Andrejs Cainikovs Dec 28 '09 at 11:41
    
chmod -R 777 * might fix it. It's not secure but if it is urgent then you can clean up later on –  Stewart Robinson Dec 28 '09 at 11:42
add comment

4 Answers 4

Probably a permissions issue.

Identify Apache User:
You first need to see what User apache is running as by looking at the User directive in the apache configuration files.

Check Permissions:*
You then need to make sure that this user can access those files, has read access to the directory itself, and execute to that directory and all the directories under it leading up to root (/). See this question, I have an answer in there :-), for more permissions help.

* Assumes unix based OS

share|improve this answer
add comment

perhaps your file permissions are wrong after the upload. Have you checked the permissions?

Christian

share|improve this answer
add comment

it could be permissions, like some other people mentioned - or it could be something silly like case sensitivity or bad file names.

I have seen lots of people with windows machines upload files where windows capitalizes the image to "Mypic.jpg" where you may have expected it to be accessed as /mypic.jpg

Having a space in the filename will also cause problems.

Do an "ls" in the directory and verify that the filenames are as expected.

share|improve this answer
add comment
up vote 0 down vote accepted

Thanks to you all for those answers. I have done all of those things and couldn't solve it. But somehow I figure out that one of our programmers changes the file extentions xxx.jpg to xxx.JPG . And because of case sensitivity those images were invisible.

I have looked everywhere even filenames but did not think to look at extensions.

Thank you very much all of you, you were very helpful.

Thanks :)

share|improve this answer
1  
Please update the original question instead of "add an answer", it makes it much easier for people to see what etra information you can give to make it easier to answer. –  Vatine Dec 30 '09 at 11:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.