Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I'm setting up my new VPS for my Rails application and was thinking about transferring my sites from apache to nginx (in order to do that, I would also have to convert my apache config over to nginx's, which I would have to learn). However, one thing that makes me think before doing this is that I want to host my SVN on the new VPS as well, and I know that SVN doesn't run on nginx.

I know that I can run svn through svnserve (although I do not have any experience with it), but I don't know if there are any pitfalls to doing so. I read that using svn+ssh doesn't let svn cache passwords, which I'd like to happen, but I'm not sure if svn:// without ssh is secure or not.

So my question is, is it better to:

  1. Use nginx for my webserver and svnserve (with or without ssh?) for svn?
  2. Use apache for my webserver and for svn?
  3. Use nginx for my webserver and apache for svn?
share|improve this question
up vote 3 down vote accepted
  1. svn:// on its own is insecure (plain-text)
  2. svn+ssh:// is secure
  3. SVN over https:// is secure

I've recently switched from svn:// to https:// mainly because I can configure LDAP authentication in Apache so I don't have to configure separate usernames/passwords for the repositories.

I'm curious as to why you want to switch from Apache to something else? (I've no experience of nginx.)

My main beef with svnserve is that authentication is on a per-repository basis, so if like me you have one repository per application, and you have upwards of 20 repositories, you have a maintenance headache on your hands.

Plus if you're running HTTP or HTTPS anyway, it makes sense to utilise that service instead of having to maintain another service. I have my SVN as a separate virtual host in Apache.

However svnserve does have its advantages - it's easy to set up and zero configuration (for the server.)

share|improve this answer
I was under the impression that nginx would be more efficient in terms of memory, something I've struggled with on my current VPS. – Daniel Vandersluis Feb 8 '10 at 20:25
nginx has some advantage on RAM usage, but if you wind up running a separate Apache for SVN you wind up using more RAM in the end. – voretaq7 Feb 8 '10 at 20:37
@voretaq7 Right, that's what I figured, which is why I was considering svnserve, but it looks like it has a lot of drawbacks. – Daniel Vandersluis Feb 8 '10 at 20:44
Running another virtual host only uses a negligible bit more memory, and only if you're servicing significantly more requests. I believe it would be more expensive (RAM usage-wise) to run two separate processes (Apache + nginx) as opposed to 2 Apache vhosts. However if you're not running Apache as well then this point is moot. It'd be interesting if you get your sites running on Apache, and then run them on nginx instead, and profile the difference in CPU and RAM usage. – Andy Shellam Feb 9 '10 at 19:23

All other things being equal I would chose the path of least complexity (#2 - Apache for www & svn).

SVN over HTTPS is considered as secure as your HTTPS configuration (so disable SSLv2, use a strong certificate and you're probably fine).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.