![]() ![]() Technorati Tags: Subversion, Debian, Apache, Mike Mason, Andrew Beacock UPDATE: I've moved some files around on my server, I've not changed any of the content of this post. Please let me know if you found this post (and the last one on how to install Subversion) useful, if so I might start to blog about Subversion even more. That's it, the repository is fully available to any user that you have created an htpasswd entry for in /etc/apache2/svn.htpasswd and who has a suitable Subversion client ( TortoiseSVN and RapidSVN are two that I have used).įor full documentation on how to really use Subversion, please take a look at the O'Reilly Version Control with Subversion online book or buy the rather excellent book Pragmatic Version Control Using Subversion by Mike Mason. Now revisit that URL again, and it should be a slightly nicer view of the repository, now with two files in it, svnindex.xsl and svnindex.css. Svn import svnindex.css -m "Improved web interface." Svn import svnindex.xsl -m "Improved web interface." This means that you just have to import the two files into Subversion for the changes to take effect:Ĭd /usr/local/src/subversion-1.2.1/tools/xslt These XSL and CSS files need to be added to the virtual host's document root, but as you may have noticed the DocumentRoot is the root of the Subversion repository. There is a slightly nicer skin that can be applied to Subversion to make the repository view cleaner, it's tucked away in the /usr/local/src/subversion-1.2.1/tools/xslt directory. Ok, try that URL again, you should be able to login and see a rather basic view of an empty Subversion repository. If you now point your browser at you should see a web view of your new repository.what's that? It's asking for a username and password? Oh yes, we need to create any required users via the Apache htpasswd utility: That's the repository created, now we need to restart Apache to let the WebDAV & Subversion modules know that the repository is now available: Now that the repository's root directory has been created, it's best to be the same user as Apache when creating the repository to ensure the files are created with the correct permissions: The repository must be 'owned' by the same user that Apache runs as, otherwise read/write access may be blocked and all sorts of strange problems can occur, Debian runs Apache as user www-data by default: Ok, that's Apache all done and dusted, now we just have to actually create the repository and then we are done. Now we need to make the Subversion site available to Apache: As you can see, it points the WebDAV & Subversion modules at /var/svn which will be the root of our repository, and uses Apache's htpasswd authentication to validate access. Again, Debian does things a little different with virtual hosts, it has them listed as separate virtual host configuration files in sites-available and then enables them in sites-enabled:ĭue to Blogger being a pain when it comes to trying to post details containing lots of 's, I'm including a link to an almost-copy of my Subversion virtual host configuration file. That's the modules configured, now we need to create the Subversion virtual host entry that will point to our Subversion repository. ![]() Now we need to enable them so that Apache will load them when it restarts: We need to create the two required module configuration files that are required by Subversion (we just removed them from /etc/apache2/nf!):Įcho "LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so" > dav_svn.loadĮcho "LoadModule authz_svn_module /usr/lib/apache2/modules/mod_authz_svn.so" > authz_svn.load It lists the available modules as individual configuration files within a mods-available directory, then enables these by linking to them from a mods-enabled directory. edit /etc/apache2/nf and remove the 2 uncommented LoadModule lines.ĭebian loads modules a little differently that the default Apache2. This is not wanted as the Debian version of Apache2 installs things slightly differently from the default Apache (nf is not used, all this configuration now lives in nf, plus the loading of modules is done differently). When you install Subversion, it adds two LoadModule lines to /etc/apache2/nf. This post will cover the resulting configuration of Apache, plus the creation of the initial repository. My last post documented how to install Subversion.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |