SVN checkout with apache2 ReverseProxy fails

Issue #323 resolved
Gerald Schneider
created an issue

I'm trying to move all our code repositories from manual management to SCM-Manager. In this process I'm trying not to break the repository URLs, so after importing the existing repositories I configured the existing apache as a reverse proxy in front of scm-manager. SCM-Manager is reachable under the URL and the checkout works without problems when I access the repositories with this URL:

In order to keep the old URLs I configured apache2 like this:

ProxyRequests         Off
ProxyPreserveHost     On
ProxyPass             /
ProxyPassReverse      /
ProxyPassReverseCookiePath /

Now I can access the SCM-Manager with this URL: This works fine, after I configured the same URL as Base URL in SCM-Manager.

What does not work is checking out code over this URL:

geschnei@gut:/tmp$ svn checkout
Authentication realm: <> SONIA :: SCM Manager
Password for 'geschnei':
svn: Server sent unexpected return value (501 Method PROPFIND is not defined in RFC 2068 and is not supported by the Servlet API ) in response to PROPFIND request for '/scm/svn/BasicEngine/!svn/vcc/default'

At first I looked into the 501 error, but then I noticed there is a superfluous /scm in the PROPFIND request. When I browse the repository with a web browser it is there as well (compare the url in the address bar and in the status bar, the mouse was hovering over the link). When I click on the link and remove the /scm manually it works.

I suppose this /scm is somewhere hard coded to be added to the url.

Comments (10)

  1. Sebastian Sdorra repo owner
    • changed status to open

    Hi, The /scm is not hardcoded, but svnkit-dav uses the context path of the webapplication to create urls for the svn xml messages. The simplest way to fix this is to change the context path of the scm-server. Do you use the standalone (scm-server) version?

  2. Gerald Schneider reporter

    So, I changed the config according to the post in google groups and restarted the service. The result is nearly the same. Now I get 404 errors for every path and it still tries to use /scm/

    URL in the Browser: http://server/

    HTTP ERROR 404
    Problem accessing /scm/. Reason:
        Not Found

    The same goes for repositories. SCM-Manager always prepends /scm to the path.

    My modified config section;

      <New id="scm-webapp" class="org.eclipse.jetty.webapp.WebAppContext">
        <Set name="contextPath">/</Set>
        <Set name="war"><SystemProperty name="basedir" default="."/>/var/webapp/scm-webapp.war</Set>
    <!--  <New id="docroot" class="org.eclipse.jetty.webapp.WebAppContext">
        <Set name="contextPath">/</Set>
        <Set name="baseResource">
          <New class="org.eclipse.jetty.util.resource.ResourceCollection">
              <Array type="java.lang.String">
                <Item><SystemProperty name="basedir" default="."/>/var/webapp/docroot</Item>
      </New> -->
      <Set name="handler">
        <New class="org.eclipse.jetty.server.handler.HandlerCollection">
          <Set name="handlers">
            <Array type="org.eclipse.jetty.server.Handler">
                <Ref id="scm-webapp" />
    <!--          <Item>
                <Ref id="docroot" />
                <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
  3. Log in to comment