I'm on a VPS environment so I have root access, btw.

So take a look at these issues: http://www.sonikastudios.com/wp-content/themes/sonikas/scripts/timthumb.php?src=/wp-content/uploads/tedleescreenshot1.jpg&w=100&h=100&zc=1&q=100

That returns a 404 error.

However when I move timthumb.php to the root of the site, it works.

I verified file/folder permissions, it's not the issue. Also, another PHP generated image that i use for Captcha, is doing the same thing...

So essentially it boils down to no .php files running from within folders. However this is not an issue otherwise because PHP scripts I have under /admin/ on other sites work fine.

So... what could cause this? Most forum articles I read lean towards a mod_security problem, but I don't even know where to start, as I'm not an apache expert.

Accepted Answer

As you have root access, try looking for what is happening in Apache logs. To follow latest request you can use tail.

Which version of Apache you are running? In my configuration of Apache 2.2 you can follow error log in terminal by invoking:

tail -f /var/log/httpd/error_log

It seems that default configuration of Apache 2.2 has error log in /usr/local/apache2/logs/error_log, so my configuration is not default.

If you do not have success with error log, try also looking for information in access log, default location at /usr/local/apache2/logs/access_log.

Written by jsalonen
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki