Integration of svn1.6 + apache2.2 configuration with Apache

Source: Internet
Author: User
Software preparation: Release) and apache_2.2.11-win32-x86-no_ssl.msi pay attention to the version to match, otherwise may report errors 1 and 2 (see below) software installation: 1. Install svn1.1 directly decompress the downloaded svn

Software preparation: svn-win32-1.6.1.zip (http://subversion.tigris.org/files/documents/15/45600/svn-win32-1.6.1.zip) and apache_2.2.11-win32-x86-no_ssl.msi note version to match, otherwise errors may be reported 1 and 2 (see below) software installation: 1. Install svn 1.1 directly decompress the downloaded svn

Software preparation:

Svn-win32-1.6.1.zip (http://subversion.tigris.org/files/documents/15/45600/svn-win32-1.6.1.zip) and apache_2.2.11-win32-x86-no_ssl.msi note version should match, otherwise errors 1 and 2 may be reported (see below)

Software installation:
1. Install svn
1.1 decompress the downloaded svn package directly.
1.2 (% svn % is the main directory of svn) use the svnadmin command under % svn %/bin to create a project:
Svnadmin create d:/svn/myproject
Note: d:/svn is the root directory of svn. myproject is our project.

2. install apache:
2.1 install as prompted
2.2 check whether port 80 is occupied
2.2.1 use the command netstat-ano | findstr ". *: 80. *:. * "check whether port 80 is used. Generally, iis, thunder and other software may occupy the port. If port 80 is used, the number in the last column is the pid of the port 80 Software. you can disable the software or modify the apache port.
2.2.2 (% apache % is the main directory of apache) You can modify the apache port to % apache %/conf/httpd. conf.
Modify Listen 80:
Listen 81
In this way, your apache port will become 81 and will not conflict with 80. After modification, the port will be re-installed according to 2.1.
2.3 enter http: // localhost: 81 in the browser. The installation is successful. (81 is the port number)

3. Combine svn with apache
3.1 copy files under % svn % to % apache %
3.1.1 put mod_dav_svn.so and mod_authz_svn.so under % svn % \ bin \ To the % apache % \ modules directory
3.1.2 put % svn % \ bin \ under the nine dll file intl3_svn.dll, libapr-1.dll, libapriconv-1.dll, libaprutil-1.dll, libdb44.dll, libsvn_delta-1.dll, libsvn_fs-1.dll, libsvn_repos-1.dll, copy the libsvn_subr-1.dll to the % apache % \ bin directory (it is recommended to copy all the past, otherwise it is easy to report Error 2, see below)
3.2 modify the file % apache %/conf/httpd. conf
3.2.1 locate the following two lines in httpd and delete the annotator:
# LoadModule dav_fs_module modules/mod_dav_fs.so
# LoadModule dav_module modules/mod_dav.so
If not deleted, error 3 is easily reported, as shown below:
3.2.2 Add the following two lines at the end of LoadModule:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
3.2.3 Add the following configuration lines at the end of the http. conf file:

DAV svn
SVNParentPath D: \ svn
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile D: \ svn \ passwd
# AuthzSVNAccessFile D: \ svnaccessfile
Require valid-user

Note: 1. SVNParentPath D: \ svn is the main directory of svn. Set it in 1.2.
2. AuthUserFile D: \ svn \ passwd password to store the file (to be used below)
Note:

It means you can access the Subversion library through a URL like this (http: // MyServer/svn)
DAV svn
Which module of Apache is responsible for serving URLs like that-here it is the Subversion Module
SVNListParentPath on
In Subversion 1.3 and later, this indicator enables Subversion to list all version libraries in the directory specified by SVNParentPath.
SVNParentPath F: \ svnROOT
Sued Subversion for finding the version library under the directory F: \ svnROOT
AuthType Basic
Enable basic verification, such as user name/password pair
AuthName "Subversion repositories"
When a verification dialog box pops up, tell the user what the verification is.
AuthUserFile F: \ svnROOT \ htpasswd
Indicates that F: \ svnROOT \ htpasswd is used as the password file to verify the user name and password.
AuthzSVNAccessFile F: \ svnROOT \ authz
Specifies F: \ svnROOT \ authz to limit the access permissions of each user or group in the version library directory.
Require valid-user
The user can access this path only after entering the correct user name and password (this indicates that, whether it is IE or Tortoise, it can only be accessed through password verification ).
The following indicates that anonymous access is allowed. For read operations, user verification is not required.
#
# Require valid-user
#
AuthUserFile and AuthzSVNAccessFileThe working principle is to first use the Apache user mechanism for authentication, then submit the request to mod_authz _ svn. so for authentication, and finally use the function provided by mod_dav _ svn. so.
3.3 create a passwd file to manage svn access permissions.
3.3.1 Use % apache % \ bin \ htpasswd. exe to create a password
Command of the first user: htpasswd-c D: \ svn \ passwd % username %
Command of the second user: htpasswd D: \ svn \ passwd % username %
Note: 1.-c is used to create a new text, and % username % is the user name. After you enter the command, a prompt will be prompted to enter the password twice.
2. D: \ svn \ passwd is the path file set in 3.1.3
The above configuration is just a simple example. You can also perform many configurations on Apache.
1. If you want all users to have the read permission on the version library and only specific users have the write permission, you can
CODE:
Require valid-user
Change
CODE:

Require valid-user

2. The above configuration uses the passwd file to restrict access permissions by using all your version libraries as a unit. If you want to get more control, such as specifying which directory a user can access the version library, you can remove the following line:
CODE:
# AuthzSVNAccessFile D: \ svnaccessfile
Create a Subversion authorization file in the text editor. Apache will ensure that only valid users can access your/svn location, and then pass the user name to the AuthzSVNAccessFile module, so that more precise permission control can be obtained based on the Subversion authorization file. Note that the path will be specified as a [Database: path] or a simple [path]. If you do not specify a library, the access rule will apply to all version libraries in the directory specified by SVNParentPath. An example of an authorization file may look like this:
CODE:
[Groups]
Admin = john, kate
Devteam1 = john, rachel, sally
Devteam2 = kate, peter, mark
Docs = bob, jane, mike
Training = zak
# Specify default access rules for all databases
# Everyone can read and the administrator can write data. dangerous elements do not have any permissions.
[/]
* = R
@ Admin = rw
Dangerman =
# Allow developers to have full access to their project version Libraries
[Proj1:/]
@ Devteam1 = rw
[Proj2:/]
@ Devteam2 = rw
[Bigproj:/]
@ Devteam1 = rw
@ Devteam2 = rw
Trevor = rw
# The document writer has the write permission on all docs directories.
[/Trunk/doc]
@ Docs = rw
# Trainees can access the training version library.
[TrainingRepos:/]
@ Training = rw

Common Errors of combining Svn with apache:
1. httpd.exe: Syntax error on line 86 of D:/Program Files/Apache Software Fou
N/Apache2.2/conf/httpd. conf: API module structure 'dav _ svn_module 'in file
Ogram Files/Apache Software Foundation/Apache2.2/modules/mod_dav_svn.so is
Ed-expected signature 41503232 but saw 41503230-perhaps this is not
E module DSO, or was compiled for a different Apache version?
Note the errors or messages above, and press Key to exit. 3 ....
The solution is to use apache 2.0

2. httpd.exe: Syntax error on line 86 of D:/Program Files/Apache Software Foundatio
N/Apache2.2/conf/httpd. conf: Cannot load D:/Program Files/Apache Software Founda
Tion/Apache2.2/modules/mod_dav_svn.so into server: \ xd5 \ xd2 \ xb2 \ xbb \ xb5 \ xbd \ xd6 \
Xb8 \ xb6 \ xa8 \ xb5 \ xc4 \ xb3 \ xcc \ xd0 \ xf2 \ xa1 \ xa3
Note the errors or messages above, and press Key to exit. 16...
We can see that the apache version is 2.2.9 or above.

3. Syntax error on line 487 of D:/Program Files/Apache Software Foundation/Apache2.
2/conf/httpd. conf:
Invalid command 'dav', perhaps misspelled or defined by a module not supported in
The server configuration
Note the errors or messages above, and press Key to exit. 25...

Remove the comments before LoadModule dav_module modules/mod_dav.so.

Post: http://hi.baidu.com/lubezhang/blog/item/bf7aa72ea2c7fa5b4ec226d2.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.