Custom 401 Error Page for SVN Server
-
10-07-2019 - |
Question
I have SVN server running on one of my domains as svn.mydomain.com and would like to setup a 401 error document for when the user authentication fails.
As svn isn't an actual folder or real subdomain, i'm confused as to where I can put the ErrorDocument 401 line.
It doesn't have to be in the .htaccess file, if it will work I could put it in the apache config, but not sure if that will work?
Thanks for any ideas.
Solution
I put it into my virtual host definition file at /etc/apache2/sites-available/svn.mydomain.com
<Location />
DAV svn
SVNPath /var/lib/svn
# other svn-config goes here
ErrorDocument 401 "Incorrect username or password"
</Location>
CU, arnep
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow