0

I know this will turn out to be something really stoopid, but I can't find it. Everything was great until I upgraded to OS X 10.6.2 (Snow Leopard) and the supplied Apache 2.2.13. I've replaced all the httpd conf files with my own that were previously working just fine. Everything is great except for one thing: Apache returns a 404 error for any requests to /assets/*. If I rename the directory from 'assets' to anything else, it works fine. I'm going crazy trying to find out why it's sensitive to the string 'assets'. I have no .htaccess files. All permissions have been checked. I've scoured all conf files (including vhosts) for what might cause this and haven't found it. Is there any reason why Apache would treat 'assets' different from anything else? Is there anywhere to check other than conf and .htaccess files?

2 Answers 2

0

Do you have a specific parameter in any of the conf files that has directives associated with this directory? Can you grep all the conf files for that phrase to see if something is going on? What do your error logs say when you attempt to browse to that directory?

0

Okay, this was weird. The VirtualHost DocumentRoot is set to /var/www/haystack and the target file is (for example) /var/www/haystack/asssets/test.html. But there's another VirtualHost at /var/www/assets. I had the following RewriteRule in the haystack virtual host:

RewriteRule /test /assets/test.html

The above rule failed (404). It turns out that instead of looking for /var/www/haystack/assets/test.html it was trying to find /var/www/assets/test.html, which doesn't exist. I confirmed this by renaming /var/www/assets, which made the problem go away. What's also weird is that I have two Macs, both on Snow Leopard and both with identical versions of Apache and identical config files. This problem only appears on one of them. I've studied the Apache documentation and can't figure out why a RewriteRule defined within one VirtualHoust should refer to the DocumentRoot for another.

You must log in to answer this question.

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