Page 1 of 1

working web.xml and apache vhost example

Posted: Thu Apr 01, 2010 9:28 am
by nutella
So far i managed to get working one single svn repository like that (web.xml):

Code: Select all

  <context-param>
        <param-name>ParentRepositoryDirectory</param-name>
        <param-value>http://testserver.example.com/test</param-value>
   </context-param>

   <context-param>
        <param-name>Password</param-name>
        <param-value>pass</param-value>
   </context-param>

   <context-param>
        <param-name>Username</param-name>
        <param-value>user</param-value>
   </context-param>

    <context-param>
        <param-name>ForcedHttpAuth</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>BasicAuth</param-name>
        <param-value>true</param-value>
    </context-param>


In this way I can use ldap authentication via the apache vhost. However I cannot add multiple repositories or a root folder to the repositories (ie: <param-value>http://testserver.example.com/rootfolder/</param-value>) . Then ldap authentication seems not to work, neither does normal user password authentication via web.xml. I really tried all possible combinations, but no luck so far...

Could someone post me an example to a multiple repository setup in the web.xml (either with "ParentRepositoryDirectory" and/or "RepositoryUrl") and an apache vhost example that would work?

Re: working web.xml and apache vhost example

Posted: Tue Apr 13, 2010 5:38 pm
by da42le
I haven't worked with the LDAP authentication, but maybe I can shed some light on how to get multiple repositories working.

There are two options; "ParentRepositoryDirectory" and "RepositoryUrl". You will only use one of these. "RepositoryUrl" will point directly to a repository. "ParentRepositoryDirectory" will point to the top level svn repository.

For my setup, I use apache http authentication, so I am mapping my apache server to my svn repository using dav-svn. My apache web address would be http://testserver.example.com/svn/<repository>

Example: Lets assume you have
http://testserver.example.com/svn/test1
http://testserver.example.com/svn/test2
http://testserver.example.com/svn/test3

If you only want to use svnwebclient for a single repository, you would use RepositoryUrl and point to one of those paths. Only a single repository will work this way.

Later, there was an updated to allow multiple repository access. This is the purpose of "ParentRepositoryDirectory".

If you want to use all three repositories, you would use "ParentRepositoryDirectory" and point to "http://testserver.example.com/svn/". When you go to the svnwebclient home page, it will prompt you for "repository name" along with user name and password.

When I access svnwebclient, I am accessing from tomcat back through apache solely for authentication purposes. svnwebclient address would be http://testserver.example.com/svnwebclient/. Repository name would be test1 (etc), and usual authenication name and password.

Hope this helps.
Dale