troubleshooting Apache 2.4.x/mod_dav issues

Resolving issues when you encounter 401 (auth) or 403 (forbidden) related errors is relatively easy. Tailing log files and looking at directory/file permissions from the console is the starting point.

But what happens when you encounter what is called an “500 – Internal Server Error”? It turns out, there are multiple levels of logging available you can set globally or within the context of a <Directory> or <VirtualHost > directive. See https://httpd.apache.org/docs/2.4/en/mod/core.html#loglevel for more details.

In one of our hiccups, setting “LogLevel trace8” revealed inadequate permissions were set for the DavLockDB file – rendering endless error 500s when transferring files or creating new folder/directories.


[Sun Dec 30 06:57:17.xxxxxx 2018] [dav:error] [pid xxxxx:tid xxxxxxxxx] [client x.x.x.x:xxxxx] Could not open the lock database. [500, #400]


[Sun Dec 30 06:58:27.xxxxxx 2018] [dav:error] [pid xxxxx:tid xxxxxxxxx] [client x.x.x.x:xxxxx] The locks could not be queried for verification against a possible "If:" header. [500, #0]

A simple permissions tweak to DavLockDB /path/to/file and restarting Apache resolved the problem.

Here’s a few Apache 2.4.x directives to look over whenever similar issues arise:


Options
AllowOverride
AuthUserFile
Require
DavLockDB