1

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 :(

Kyle Brandt
  • 82,107
  • 71
  • 302
  • 444
Harun Baris Bulut
  • 455
  • 1
  • 8
  • 20

4 Answers4

2

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

Kyle Brandt
  • 82,107
  • 71
  • 302
  • 444
1

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

Christian

Christian
  • 4,645
  • 2
  • 23
  • 27
1

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.

aspitzer
  • 967
  • 5
  • 14
0

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 :)

Harun Baris Bulut
  • 455
  • 1
  • 8
  • 20
  • 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