SVN error due to htaccess

The interview spree continues but hoping to finalize one tech analyst today. He is able to solve all fizzbizz problems atleast. For last 2 days we were facing some problems with SVN. There is no problem with SVN update or SVN checkout but while committing files it shows an error.

sh-3.00$ svn commit test.php -m "Aji: adding a test file to check svn problem"
Adding test.php
svn: Commit failed (details follow):
svn: PROPFIND request failed on '/svn/blahblah/trunk/test.php'
svn: PROPFIND of '/svn/blahblah/trunk/test.php': 200 OK (

We earlier presumed it to be a typical SVN permission problem but everything was ok. Also none of the SVN folders were corrupted. We checked the apache configuration which had

<location /blah-blah/svn>
DAV svn
SVNParentPath /blahblah/svn
AuthType Basic
AuthUserFile /blahblah/etc/svn.basic.passwd
Require valid-user
AuthzSVNAccessFile /blahblah/etc/svn-access.conf

Also we realized that the problem started occurring after adding the htaccess to Now as anyone will do we have kept the SVN repos in a different folder than the public_html (Document root of the website used for SVN).

After testing few things we came to a conclusion that it is happening because of the customized 404 catcher
ErrorDocument 404 /sys/common/tools/404handler.php
We were much worried as the document root was not supposed to be accessed during these calls, it should be taking it from the SVN folder. After reading some apache docs I understand the order of its processing:-

The <location> directive provides for access control by URL. It is similar to the <directory> directive, and starts a subsection which is terminated with a </directory></location> directive. <location> sections are processed in the order they appear in the configuration file, after the <directory> sections and .htaccess files are read, and after the <files> sections.</files></directory></location>

.htaccess is getting processed before the <location> directive. Now the issue was how to make the </location><location> directive work before htaccess. After some tryouts we were not able to do it. Then we took the help of Alias. We added

Alias /blahalah/svn "/complete-path/svn"
<directory "/full document root path for the website/">

It is working fine. Hope it helps someone in similar situation. Joing back to work, planning to stay back at company guest house for server auditing.

2 Replies to “SVN error due to htaccess”

Comments are closed.