软件服务器 配置文件,Subversion服务器两种配置方式所用的配置文件及格式

目前subversion服务器可以用两种方式架设,

一种是基于svnserve,svnserve作为服务端;

一种是基于Apache,用apache作为服务端。

下面说说这两种方式所用的配置文件。

基于svnserve 配置文件位于版本库的conf下,有三个可以使用。

1、svnserve.conf

### This file controls the configuration of the svnserve daemon, if you

### use it to allow access to this repository. (If you only allow

### access through http: and/or file: URLs, then this file is

### irrelevant.)

### Visit [url]http://subversion.tigris.org/[/url] for more information.

[general]

### These options control access to the repository for unauthenticated

### and authenticated users. Valid values are "write", "read",

### and "none". The sample settings below are the defaults.

anon-access = none

auth-access = write

### The password-db option controls the location of the password

### database file. Unless you specify a path starting with a /,

### the file's location is relative to the conf directory.

### Uncomment the line below to use the default password file.

password-db = passwd

### The authz-db option controls the location of the authorization

### rules for path-based access control. Unless you specify a path

### starting with a /, the file's location is relative to the conf

### directory. If you don't specify an authz-db, no path-based access

### control is done.

### Uncomment the line below to use the default authorization file.

authz-db = authz

### This option specifies the authentication realm of the repository.

### If two repositories have the same authentication realm, they should

### have the same password database, and vice versa. The default realm

### is repository's uuid.

# realm = My First Repository

2、passwd (svnserve.conf中指明的password-db文件)

不同于基于apache的,此文件中的密码为明文

### This file is an example password file for svnserve.

### Its format is similar to that of svnserve.conf. As shown in the

### example below it contains one section labelled [users].

### The name and password for each user follow, one account per line.

[users]

# harry = harryssecret

# sally = sallyssecret

3、authz (svnserve.conf中指明的authz-db文件)

### This file is an example authorization file for svnserve.

### Its format is identical to that of mod_authz_svn authorization

### files.

### As shown below each section defines authorizations for the path and

### (optional) repository specified by the section name.

### The authorizations follow. An authorization line can refer to a

### single user, to a group of users defined in a special [groups]

### section, or to anyone using the '*' wildcard. Each definition can

### grant read ('r') access, read-write ('rw') access, or no access

### ().

[groups]

# harry_and_sally = harry,sally

# [/foo/bar]

# harry = rw

# * =

# [repository:/baz/fuz]

# @harry_and_sally = rw

# * = r

基于Apache

配置文件可以在httpd.conf中指定,如

DAV svn

#SVNListParentPath on

SVNParentPath e:\svnreps

AuthType Basic

AuthName "Subversion"

AuthUserFile e:\svnreps\passwd

AuthzSVNAccessFile e:\svnreps\authz

Require valid-user

1、passwd (Location段中AuthUserFile指定)

此文件由Apache的bin目录下htpasswd程序创建,密码为密文

try1:$apr1$j04.....$k4XHO0EUJCuG2A5IveRYF1

try2:$apr1$jR0.....$57ZHP2MRRAXQu4Dw.Rv.a1

2、authz (Location段中AuthzSVNAccessFile指定)

[总结]

从上面可以看出两种配置的区别,基于svnserve的配置文件一般均在conf目录下,目前还不能用绝对路径指定为其它目录,除非用相对路径;

而基于 Apache的,配置文件由httpd.conf的Location段中指定,可以在任意位置。另外,两种用户密码文件的格式是不一样的,一种明文,一种密文。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值