Configuring Apache for Subversion
Accessing Subversion Repositories via Apache has several advantages. This page describes how to setup Apache to Serve Subversion Repositories.
|
Codebeamer must be installed and started before this description can be used.
|
|
The mod_evasive apache module must be disabled (if enabled) to ensure that remote-api and webdav work properly.
|
Windows
|
Choose the 32 bits version of all software mentioned below even when running 64 bits Windows.
|
This description assumes that Codebeamer has been installed into :
C:\CB-5.5
• Download Apache 2.2.17 from the location below or from a mirror:
http://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist//httpd/binaries/win32/httpd-2.2.17-win32-x86-no_ssl.msi
• Install Apache to the default location (C:\Program Files\Apache Software Foundation) and take Typical Installation.
• Edit the Apache configuration:
Click > > > > >
The configuration file is:httpd.conf
• Append the lines of C:\\CB-5.5\repository\scmweb\httpd.conf.svn to the end of Apachehttpd.conf
• Copy mod_authz_svn.so andmod_dav_svn.so from C:\CB-5.5\libexec\svn\bin to C:\Program Files\Apache Software Foundation\Apache2.2\modules
• AddC:\CB-5.5\libexec\svn\bin to your PATH on > > .
• Test configuration:
Click > > > >
• If everything's fine restart Apache:
Click > > > > >
Linux/Unix
|
It is important that Codebeamer operating system user and apache belong to the same GID.
|
Ubuntu
This description assumes that Codebeamer has been installed into
/home/codebeamer/CB
1. Install Apache HTTP Server using :sudo apt-get install apache2.
2. Execute:sudo apt-get install libapache2-svn.
This will install and enable the modules required in order to user Subversion with Apache.
1. Copy httpd.conf.svn : sudo cp /home/codebeamer/CB/repository/scmweb/httpd.conf.svn /etc/apache2/mods-available/svn.conf.
2. Enable svn support :sudo ln -s /etc/apache2/mods-available/svn.conf /etc/apache2/mods-enabled/svn.conf.
3. Test the apache configuration:sudo apache2ctl configtest.
4. Restart Apache:sudo /etc/init.d/apache2 restart.
RedHat
1. Install Apache HTTP Server and the required moduled: sudo yum install httpd subversion mod_dav_svn.
2. Copy /home/codebeamer/CB/repository/scmweb/httpd.conf.svn to /etc/httpd/conf.d/svn.conf.
3. Test the apache configuration:apachectl configtest.
4. Restart Apache:sudo /etc/init.d/httpd restart.
SUSE 11
1. Install subversion and subversions' apache2 modules using :
sudo zypper install subversion subversion-server subversion-tools
svn --version
2. Copy /home/codebeamer/CB/repository/scmweb/httpd.conf.svn to /etc/apache2/conf.d/httpd.conf.svn.
3. Edit the newly copied /etc/apache2/conf.d/httpd.conf.svn file and remove all LoadModule statements, for example the final result should be:
<Location /svn>
# AuthBasicAuthoritative Off # http://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html
DAV svn
SVNParentPath "/home/codebeamer/CB/repository/svn/"
#SVNListParentPath on
AuthzSVNAccessFile "/home/codebeamer/CB/repository/access/acl.svn"
AuthName "Subversion Repository"
AuthType Basic
AuthUserFile "/home/codebeamer/CB/repository/access/.htaccess"
require valid-user
</Location>
4. Edit /etc/apache2/httpd.conf file and add this line to the end so the new SVN configuration will be loaded
Include /etc/apache2/conf.d/httpd.conf.svn
5. Edit /etc/sysconfig/apache2 file and add these modules to APACHE_MODULES line:
APACHE_MODULES="... dav_svn authz_svn"
6. Restart Apache2 using this command:
rcapache2 restart
7. Now the SVN checkout and commit should work. You can test this using a checkout command like:
svn co http://suse.codebeamer.com/svn/mysvn
|
The path of the /home/Codebeamer/CB/repository/access/acl.svn and .htaccess has been changed in 9.3, it was /home/Codebeamer/CB/repository/acl.svn and .htaccess before 9.3
|