svnadmin create c:/repositories/test
svnadmin create c:/repositories/secure
openssl req -config openssl.cnf -new -out svn.example.com.csr
openssl rsa -in privkey.pem -out svn.example.com.key
openssl x509 -in svn.example.com.csr -out svn.example.com.cert -req -signkey svn.example.com.key -days 1000
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
Listen 443
Include conf/extra/httpd-vhosts.conf
<VirtualHost _default_: 443> SSLEngine on SSLCipherSuite ALL:! ADH:! EXPORT56: RC4 + RSA: + HIGH: + MEDIUM: + LOW: + SSLv2: + EXP: + eNULL # specify names on certificate files SSLCertificateFile conf / svn.example.com.cert SSLCertificateKeyFile conf / svn.example.com.key SetEnvIf User-Agent ". * MSIE. *" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 # redirect from the root path RedirectMatch ^ (/) $ http://google.com # specify general settings for all repositories <LocationMatch ^ /. *> Order allow, deny Allow from all AuthType Basic AuthBasicProvider ldap AuthzLDAPAuthor gratification AuthName "SVN main repo" # Specify the path to the LDAP server. It is important to remember that non-SSL uses ldap: // and port 3268 # Also available with ports 389 and 390 for SSL AuthLDAPURL "ldaps: //myDC.domain.com: 3269 / DC = domain, DC = com? SAMAccountName? Sub? (ObjectClass = *)" # specify DN the path to the user who will be bound to the LDAP server. AuthLDAPBindDN "CN = Apache_bind, OU = users, OU = my, DC = domain, DC = com" # Password in OPEN view AuthLDAPBindPassword qweqwe AuthLDAPGroupAttributeIsDN on AuthLDAPGroupAttribute member SSLRequireSSL # ban on anonymous SVNPathAuthz on AuthzSVNAnonymous off </ LocationMatch> # specify the path to our created test repository <Location / test> DAV svn AuthName "SVN Test" SVNPath From: / repositories / test SVNListparentPath off # let all domain users require valid-user </ Location> # and create a path to another repository with rights delineation <Location / secure> DAV svn AuthName "SVN Secure" SVNPath c: / repositories / Secure # We grant write permissions to the group SVN_Secure_write Require ldap-group CN = SVN_Secure_write, OU = my, DC = domain, DC = com # and restrict users to read the group SVN_Secure_read <Limit GET PROPFIND OPTIONS REPORT> Require ldap-group CN = SVN_Secure_read, OU = my, DC = domain, DC = com </ Limit> </ Location> </ Virtualhost>
Source: https://habr.com/ru/post/73403/
All Articles