How to run a SVN server on subdomain on port 80?

Posted on 2007-08-03
Last Modified: 2013-11-05
On a Debian "stable" distribution, I'm looking to run a simple SVN server on, on port 80.

I already am running Apache 1.3 on, and various other, all vhosts, listening on port 80. The SVN subdomain is not handled by Apache. I have CNAME records in place for all subdomains, and an A record for

When I attempt to start the SVN server on port 80, with the subdomain as listen-host, I get the following:

server:# svnserve -d --listen-port 80 --listen-host -r /usr/local/svn
Can't bind server socket: Address already in use

I believe the problem is due to all domains and subdomains all being served from the same server, and thus the same IP-address, but I am not sure.

What can I do to allow the SVN server to listen on port 80 as well as Apache listening on port 80 for the other subdomains?
Question by:Achton
    LVL 19

    Accepted Solution

    I believe what you need is libapache2-svn. This page has some rather useful pointers:

    You may need to run svn on a different port and use mod_proxy or mod_rewrite to bounce an apache vhost to the different port via localhost.

    Author Comment

    Thanks, but I'd rather keep it simple and not mix Apache into this (at all if possible, or only very little).

    I'd prefer to have the SVN server running as a daemon, and on port 80. It works fine using, say, port 443 or 3690. This is to enable access to the SVN server from behind very restrictive firewalls, amongst other things.

    BTW: I should probably note that the server also runs Shorewall, though I don't think it is the primary reason for this problem.
    LVL 15

    Expert Comment

    You can't run two different services on the same port and IP address at the same time.

    You can see what runs on port 80 using:

    netstat -lnp

    Chances are, this would be apache (httpd).

    What you could do, though, is start svndaemon at some other port on and set up Apache to proxy all requests to a specific virtual host to


    Author Comment

    It's a good suggestion, and one I have tried already. I gave it one more shot just now, though.

    Unfortunately, it seems that when Apache (1.3 in my case) is not DAV/SVN-aware, I cannot have Apache forward requests. I might as well be trying to forward RTSP packets  via Apache to some local server on a random port. If Apache doesn't understand the data, it can't be proxied.
    LVL 15

    Assisted Solution

    good point. The only other solution there would be getting a separate IP address for SVN, then. This is, assuming that you can't get mod_dav_svn for your Apache. Out of curiousity, why do you want to have SVNServe and not apache serve the repositories? Maybe there is a different way to get this done.

    Author Comment

    I can probably install DAV and SVN through Apache modules. But I prefer not to, since I do not have complete control and ownership of the server in question. Thus, I'd rather keep it as simple as possible, hence the seperate svnserve process.

    I was afraid seperate IP's might be the only solution, but was not 100% sure, so thanks for confirming.
    LVL 15

    Expert Comment

    If I was the server administrator of the server in question, I would very much prefer having mod_dav_svn module in apache to running one more stand-alone daemon and dedicating an IP address to it. Bottom line - talk to the server admin, he/she might offer you some options we haven't thought about.
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
    Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now