Talk:WebSVN

Dedicated SVN Sub-Domain
Perhaps it might be a good idea to clarify what you mean by dedicated sub-domain. When I created a sub-domain for my svn projects it created two directories in my home directory. One was for the repositories and the other was for the web documents. I am assuming this is what was meant. web files in the repository folder will not work. You have to place them in the webdoc folder.

Examples:
 * Repository in ~/svn and web files in ~/svn.domain.com for a dedicated domain like  http://svn.domain.com/ 

- Suki 14:40, 15 February 2008 (PST)

Authentication
Because of how Dreamhost sets up their Apache2 SVN repositories they don't use a single global password / authentication file. But instead each repository gets their own password / authentication files. The apache process that serves up the WebSVN can only authenticate to one file not multiple.

As far as I know. Am I incorrect with this assumption? - Suki 14:40, 15 February 2008 (PST)


 * That statement above was not entirely correct. It can work just not as intuitively as you would think. Because of the way Dreamhost separated the two directories and how it handles the repositories. You have to make the authentication a bit manually. Use the panel to make a restricted htaccess file. Add all the users you might want regardless of repository. Then in the config.php set up your repositories as you see fit and add an authorization line per .access file you use.

$config->useAuthenticationFile('/path/to/parrent/repos.access', 'repos');
 * This should allow it to hide repositories that the user does not have access to per repository despite what they logged in as to get to websvn. However there is a bug in version 2.0 that you have to fix. Dreamhost apache sends over the REDIRECTED_REMOTE_USER variable instead of the standard REMOTE_USER used in basic authentication. This patch will fix that problem for you.

--- include/auth.php~  2008-02-15 14:46:30.000000000 -0800 +++ include/auth.php   2008-02-15 15:22:35.000000000 -0800 @@ -55,7 +55,14 @@       {                if ($username == "") // Use the current user { -                      $this->user = @$_SERVER["REMOTE_USER"]; +                      if (isset($_SERVER["REMOTE_USER"])) +                      { +                               $this->user = @$_SERVER["REMOTE_USER"]; +                      } +                       else +                      { +                               $this->user = @$_SERVER["REDIRECT_REMOTE_USER"]; +                      }                }                else {
 * - Suki 16:05, 15 February 2008 (PST)