0

I have configured mod_dav_svn 1.8.9 on FreeBSD along with WebSVN 2.3.3 this way:

<Location /repos/svn>
    DAV svn
    SVNParentPath /usr/local/svn/repos
    SVNListParentPath On
    SVNPathAuthz Off
</Location>

Alias /repos/websvn "/usr/local/www/websvn"
<Directory "/usr/local/www/websvn">
    Order Allow,Deny
    Allow from all
    Options FollowSymLinks MultiViews
    DirectoryIndex wsvn.php
</Directory>

While this works well, I do not understand the full meaning of MultiViews. As far as I understood that feature, both the repos and the WebSVN browser should be accesible through one URL, shouldn't they?

If not, WebSVN is generating me the following URL: http://www.example.com/repos/websvn/wsvn/<repo>

How do I get rid of that wsvn subpath? The config.php does not help much.

Michael-O
  • 261
  • 1
  • 2
  • 13

1 Answers1

0

The directive is probably superfluous since websvn has its own file where things are put into place. On my machine (Ubuntu 12.04) it's this file

/etc/websvn/apache.conf

The contents probably need some editing. It looks like this:

# Configuration for websvn using php4.

Alias /websvn /usr/share/websvn

<Directory /usr/share/websvn>
  ## No MultiViews
  #DirectoryIndex index.php
  #Options FollowSymLinks
  ## MultiViews
  DirectoryIndex wsvn.php
  Options FollowSymLinks MultiViews
  ## End MultiViews
  Order allow,deny
  Allow from all
  <IfModule mod_php4.c>
    php_flag magic_quotes_gpc Off
    php_flag track_vars On
  </IfModule>
</Directory>

The default was to disable MultiViews, so I uncommented the lines for MultiViews and changed the Alias and Directory target. Issue resolved.

superk
  • 101
  • How does your final URL look like now? – Michael-O Mar 10 '15 at 21:13
  • http:///websvn/wsvn////..../. But the /wsvn is an addition of listing.php or some other script that reads about my request for multi views from $config->MultiViews. My problem was having duplicate and directives in two different apache configuration files – superk Mar 11 '15 at 10:14
  • The URL does not look like the way I wanted. You still have the `/wsvn/` in the URL. The point was to avoid this duplicity. – Michael-O Mar 11 '15 at 15:04
  • Ok. Found solution here - [here](http://tigris-scm.10930.n7.nabble.com/MultiViews-considered-silly-td58632.html). Basically, replace the Alias line directing the alias into the wsvn.php file: `Alias /websvn /usr/share/websvn/wsvn.php/`. Contrast to the solution in the link, in my answer I leave the websvn part of the URI since in my case there's a project with the same name of my repository under the DocumentRoot folder. The resulting URL is `http:///websvn////..../` – superk Mar 11 '15 at 21:23
  • That looks good. Though the post is quite old. Did you verify against latest version of WebSVN? – Michael-O Mar 12 '15 at 09:11
  • The Alias line in my previous comment is now used inside my own webSVN installation 2.3.3 – superk Mar 12 '15 at 12:55