apache_svn多库配置

 

[上文]http://blog.csdn.net/redvalley/archive/2011/04/28/6370450.aspx

1.创建两库

svnadmin create /sdd/svn/zzf

svnadmin create /sdd/svn/kingdee

chown -R www-data:www-data /sdd/svn/zzf

chown -R www-data:www-data /sdd/svn/kingdee

chown www-data:www-data /sdd/svn

 

2.两库指向相同同授权配置

nano /sdd/svn/zzf/conf/svnserve.conf

nano /sdd/svn/kingdee/conf/svnserve.conf

anon-access = none

auth-access = write

password-db = ../../passwd

authz-db = ../../authz

 

nano /sdd/svn/authz

#svn、http统一(与上文不同)

[zzf:/]

zzf=rw

*=

[kingdee:/]

eas=rw

*=

 

nano /sdd/svn/passwd

[users]

zzf=******

eas=******

 

3.apache多库配置,共享apache_passwd、authz。

<Location /svn/zzf> #http://xxx.xxx.xxx/svn/zzf 

  DAV svn

  SVNPath /sdd/svn/zzf

  AuthType Basic

  AuthName "Subversion Repository --own by zzf"

  AuthUserFile /sdd/svn/apache_passwd #用户密码,与svn的passwd不同,后面设置。 

  AuthzSVNAccessFile /sdd/conf/authz #共享svn权限控制 

  Require valid-user #认证 

</Location>

<Location /svn/kingdee>

  DAV svn

  SVNPath /sdd/svn/kingdee

  AuthType Basic

  AuthName "Subversion Repository --own by zzf"

  AuthUserFile /sdd/svn/apache_passwd

  AuthzSVNAccessFile /sdd/svn/authz

  Require valid-user

</Location>

 

4.设置http访问用户密码

htpasswd -c /sdd/svn/apache_passwd zzf

...

htpasswd /sdd/svn/apache_passwd eas

...

 


/etc/init.d/apache2 restart,KO~

两种方式访问同一资源

http://wikiway.cn/svn/zzf

svn://wikiway.cn/zzf

 

你可能感兴趣的:(apache,SVN,basic,subversion)