The Answer to Life, the Universe, and Everything

Monday, November 17, 2008

Apache2.2 : AuthUserFile Error

<Location /svn>
DAV svn
SVNParentPath "/var/svn"
AuthzSVNaccessFile /var/svn/.htpasswd
AuthType Basic
AUthName "Dev Project"
AuthUserFile /var/svn/.htpasswd

I set the basic authentication such as above which ended up the below error.
# /etc/init.d/apache2 reload
Syntax error on line 64 of /etc/apache2/mods-enabled/dav_svn.conf:
Invalid command 'AuthUserFile', perhaps misspelled or defined by a module not included in the server configuration

Since below,
$ for i in /usr/lib/apache2/modules/*; do strings $i | grep -q -i AuthUser && echo $i; done
$ ls /etc/apache2/mods-available/authn_file.load

You need to do as follow,
$ sudo /usr/sbin/a2enmod authn_file
Module authn_file installed; run /etc/init.d/apache2 force-reload to enable.
$ /usr/sbin/apache2ctl configtest
Syntax OK

No comments: