3

I have been keeping all my Subversion repositories on my local computer for a while, but now I decided to move them to my web hosting server. It's an apache server and the hosting company has set up svn. My question is, where should I store my svn repositories. I originally stored them in the public_html/ directory, but (I'm certainly no security expert) I think only publicly available web content should be stored there. On the other hand, if I try storing the repositories in ~/var/svn/ then my subversion client (Eclipse) says "no element found". How do other people store their repositories with regards to Apache? Thank you.

1

4 Answers 4

1

You can select any physical location for your repositories collection, because logical path is defined inside Apache (Location container + SVNPath|SVNParentPath) later. You have only

  • select big partition (repository may require a lot of space)
  • don't forget chown|chmod repo dirs, in order to give Apache process the ability to handle files of repository

/var (/var/repos/) is good candidate for repo-root

Sign up to request clarification or add additional context in comments.

1 Comment

however, /var is the conventional root for things like data/log/repo files
0

Typically, you would store data in an appropriate subdirectory of /var (not ~/var), that is if you have access to it. E.g. /var/svn

1 Comment

It's a shared server from my webhosting service, so I don't (think I) have access to anything outside of my home directory. But even if I did, it looks like Apache will only serve files out of ~/public_html, so I still can't figure out how I'd get my Subversion client to connect to the repository.
0

We haven't adopted SVN for our web source yet, but have been using CVS. Our solution was to simply prevent Apache from serving the CVS store using IndexIgnore

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t 

You may be able to do something similar, using something based upon .svn.

Comments

0

It will be difficult if you are using a shared web hosting, because you need to have an access to root, to create svn-group and creating the structure of the repository. You also need to install some module on Apache like dav_svn. You will need to create a VirtualHost (sites-available) in order to serve your repos over a specific DNS.

There is a lot of tutorial on the inter-webs -> http://www.debuntu.org/how-to-subversion-svn-with-apache2-and-dav/ (for ubuntu)

Me, I rent a Virtual Private Server to host my SVN.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.