Skip to content

Instantly share code, notes, and snippets.

@tsertkov
Last active December 22, 2015 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsertkov/6488369 to your computer and use it in GitHub Desktop.
Save tsertkov/6488369 to your computer and use it in GitHub Desktop.
Apache virtualhost configuration for svn over webdav server. Works with system users via pwauth and virtual ones using htpasswd file.
<VirtualHost *:80>
ServerName svn.example.com
RewriteEngine on
RewriteRule (.*) https://svn.example.com$1 [R=301,L]
</VirtualHost>
<VirtualHost *:443>
ServerName svn.example.com
Include example-ssl.conf
AddExternalAuth pwauth /usr/local/sbin/pwauth
SetExternalAuthMethod pwauth pipe
<Location />
AddDefaultCharset utf-8
BrowserMatch "SVN" redirect-carefully
Dav svn
SVNParentPath /var/svn
AuthzSVNAccessFile /var/svn/conf/svnpolicy
AuthType Basic
AuthName "Example SVN"
AuthBasicProvider file external
AuthUserFile /var/svn/conf/.htpasswd
AuthExternal pwauth
Satisfy any
Require valid-user
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment