How can I link subversion server with apache2?
I am using Linux 10.04 LTS, and I would like to link subversion with apache2. There are many sites that explains about installing SVN server with apache2, but it seems that they only explain about installing svn server.
I was wondering, if it is possible to create remote subversion directory (as a server) in one of the web directories s开发者_开发技巧o that when I, or my partners make some changes and commit it to the subversion directory, the svn directory will be updated (since it is a svn server), and the remote website will be automatically updated as well.
The Subversion repository structure isn't really suited for this (it doesn't show up as a filesystem directly). What you probably want is to make your website a working copy (checked out Subversion repository) instead of a repository itself. The problem, however, is that it doesn't get updated automatically. Instead, you'll need to manual call "svn up", set up a cron job to do it, or set up a post-commit-hook on the repository that will automatically update the website.
My advice to you is to set up a Staging folder (like a branch) and a Production folder (also a branch). This way you can have two sites going: one for staging and internal testing, then one for production. Commit all your changes to a tree, then when you merge your changes into the Staging branch, make it automatically update the Staging server. When you merge your changes into the Production branch, make it automatically update the Production server.
Apache itself is able to host subversion as a server over http. If you want to host a remote subversion directory, consider mounting the remote directory over NFS or SSH, then use apache DAV to provide SVN access over http. SVNServe will not be needed at all when using this method.
精彩评论