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

3
  • Can you be more specific, show some logs, give names of directories and what you did exactly?
    – raphink
    Dec 28, 2009 at 11:33
  • Please provide logs, configuration, and any .htaccess files you may have. Dec 28, 2009 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 Dec 28, 2009 at 11:42

4 Answers 4

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

1

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

Christian

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.

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

1
  • 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, 2009 at 11:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .