I have a VisualSVN Server installed on a Windows server, serving several repositories.
Since the web-viewer built into VisualSVN server is a minimalistic subversion browser, I'd like to install WebSVN on top of my repositories.
The problem, however, is that I can't seem to get authentication to work. Ideally I'd like my current repository authentication as specified in VisualSVN to work with WebSVN, so that though I see all the repository names in WebSVN, I can't actually browse into them without the right credentials.
By visiting the cached copy of the topmost link on this google query you can see what I've found so far that looks promising.
(the main blog page seems to have been destroyed, domain of the topmost page I'm referring to is the-wizzard.de)
There I found some php functions I could tack onto one of the php files in WebSVN. I followed the modifications there, but all I succeeded in doing was make WebSVN ask me for a username and password and no matter what I input, it won't let me in.
Unfortunately, php and apache is largely black magic to me.
So, has anyone successfully integrated WebSVN with VisualSVN hosted repositories?
VisualSVN Server is a freeware Apache Subversion server package for Windows. The package is designed and implemented to provide Subversion version control as a first class citizen application in an Active Directory environment.
Server port This setting allows you to configure VisualSVN Server to use a specific TCP port. By default the server uses port 443 for HTTPS and port 80 for HTTP. If the default ports are occupied by other applications, it is suggested to use the 8443 and 8080 ports instead.
Community license (free). This free and fully functional license enables core VisualSVN Server features such as the VisualSVN Server Manager MMC console, PowerShell Scripting and Automation, rich HTML5-powered web interface and support for secure HTTPS.
I got WebSVN authentication working with VisualSVN server, albeit with a lot of hacking/trial-error customization of my own.
Here's how I did it:
If you haven't already, install PHP manually by downloading the zip file and going through the online php manual install instructions. I installed PHP to C:\PHP
Extract the websvn folder to C:\Program Files\VisualSVN Server\htdocs\
Go through the steps of configuring the websvn directory, i.e. rename configdist.php to config, etc. My repositories were located in C:\SVNRepositories, so to configure the authentication file, I set the config.php line so: $config->useAuthenticationFile('C:/SVNRepositories/authz'); // Global access file
Add the following to C:\Program Files\VisualSVN Server\conf\httpd-custom.conf :
# For PHP 5 do something like this: LoadModule php5_module "c:/php/php5apache2_2.dll" AddType application/x-httpd-php .php # configure the path to php.ini PHPIniDir "C:/php" <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> <Location /websvn/> Options FollowSymLinks AuthType Basic AuthName "Subversion Repository" Require valid-user AuthUserFile "C:/SVNRepositories/htpasswd" AuthzSVNAccessFile "C:/SVNRepositories/authz" SVNListParentPath on SVNParentPath "C:/SVNRepositories/" </Location>
This worked for me, and websvn will only show those directories that are authorized for a given user. Note that in order for it to work right, you have to provide "Main Level" access to everybody, and then disable access to certain sub-directories for certain users. For example, I have one user who doesn't have main level access, but does have access to a sub-level. Unfortunately, this person can't see anything in websvn, even if he links directly to filedetails.php for a file he's authorized to see. In my case it's not a big deal because I don't want him accessing websvn anyway, but it's something you'll want to know.
Also, this sets the server up for an ssl connection, so once you've set it up, the address will be and https:// address, not the regular http://.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With