How to fix 'File name too long' error in apache2?

Solution 1:

This is a known bug and or known problem.

This could be the bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=45187

Or your file name might actually be too long, in that case, make sure your file-names (or anything between 2 slashes) is not longer then 255 characters.

Also, make sure to revise any mod_rewrite-rules you have, they can also cause this behavior.

When you have an argument/filename longer then 255 chars, apache will check this against your file system limits.

More info on the max filename length can be found here: http://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits

There aren't a lot of them that allow for longer file names, so you will have to make them shorter, no other way around them.