Archive for the 'subversion' Category
Fun with Subversion and Apache
I’ve been having some issues with getting my Subversion repository to play nicely. For some reason it started to randomly attempt to point to a repository called “error” which puzzled me a bit. A mailing list entry has set me up with a solution (http://svn.haxx.se/users/archive-2004-06/1312.shtml) and it appears looking around a bit further and a few other people have had the issue as well. The basic problem is that somewhere the system is throwing an error, it appears a 500 which is an Internal Server Error. But this doesn’t seem to be the base cause since I feel this is actually being generated internally for some reason and bounced around. It happens that the reason why its bouncing here is because of an error directive somewhere is causing an error page to be looked for, and since by default we’re pointing to our errors being at /error, which Subversion tries to find a repository for because “SVNParentPath” is set with the Location set to the root (e.g. “
So the solution from the above as to add a redirect to another virtual host on the server:
RedirectMatch permanent ^/error http://pasamio.com/error
Another solution is to rewrite the ErrorDocument to make it return strings instead of page:
ErrorDocument 400 "400 HTTP BAD REQUEST" ErrorDocument 401 "401 HTTP UNAUTHORIZED" ErrorDocument 403 "403 HTTP FORBIDDEN" ErrorDocument 404 "404 HTTP NOT FOUND" ErrorDocument 405 "405 HTTP METHOD NOT ALLOWED" ErrorDocument 408 "408 HTTP REQUEST TIME OUT" ErrorDocument 410 "410 HTTP GONE" ErrorDocument 411 "411 HTTP LENGTH REQUIRED" ErrorDocument 412 "412 HTTP PRECONDITION FAILED" ErrorDocument 413 "413 HTTP REQUEST ENTITY TOO LARGE" ErrorDocument 414 "414 HTTP REQUEST URI TOO LARGE" ErrorDocument 415 "415 HTTP SERVICE UNAVAILABLE" ErrorDocument 500 "500 HTTP INTERNAL SERVER ERROR" ErrorDocument 501 "501 HTTP NOT IMPLEMENTED" ErrorDocument 502 "502 HTTP BAD GATEWAY" ErrorDocument 503 "503 HTTP SERVICE UNAVAILABLE" ErrorDocument 506 "506 HTTP VARIANT ALSO VARIES"
This also fixes the problems, though in a few more lines. This is perhaps the better solution as it wipes out the old ErrorDocument directives that were giving us some troubles and returns a straight string. The next simplest solution is of course to move the Subversion “SVNParentPath” from the root to its own path underneath the root, which is the solution that most people seem to go in for doing.
No comments