Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to serve files from a SVN repository, on the same server, to apache www directory? I want to show my boss/customer the most recent version of a project without uploading it by FTP.

I'm using Ubuntu 10.

share|improve this question

There's no reason why not - checkout the directory to the place you've configured Apache to serve pages from (eg the www directory). When you want to update it, "svn update" will do it.

You can get complicated by adding a automatic export function to a post-commit hook but the above method is very simple and easy.

share|improve this answer
That works only if you want to constantly take the extra step of going to the checked out repo and manually calling svn update. If your working in real-time and would like to see changes on the fly that will get old real fast. – xXPhenom22Xx Mar 5 '12 at 18:04

Actually apache has a module to serve a repository (mod_dav_svn) that may be interesting for you.

share|improve this answer

You have to create a POST-COMMIT hook to do the job of sending the files to your web root from the SVN repo. Every time you make a commit it will call this simple script that will push the updated files to the folder of your choice.

Here is a quick tutorial that we use to do the same thing:

share|improve this answer

As pconcepcion notes, Apache has the mod_dav_svn module, which is actually required to create a Subversion repository (when using Apache).

If you're using http:// or https:// to access your repository (instead of svn://) then you're already good to go. You can directly access the latest revision in your browser.

If you're using svnserve to serve your repository using svn:// then you could still set up Apache as an additional interface for your repository. Luckily, using Apache to serve Subversion repositories is actually the usual approach. The installation procedure is documented on the Ubuntu Wiki:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .