WebSVN installation & customization »
FERDY CHRISTANT - APR 2, 2006 (09:49:02 AM)
Now that I have my version management system implemented using SubVersion, I wanted to install WebSVN as well. WebSVN allows for online repository browsing. What exactly does that mean? It means you can use your browser to view all your source code, its different revisions, change history and even differences between revisions. Sounds really cool eh?
Installation
Installation of WebCVS is a joy, assuming you have a working SubVersion setup:- Download it.
- Extract the archive you downloaded to any directory within your Apache root, i.e. "/var/www/html/WebSVN".
- In the "includes" directory of your extracted WebSVN directory, edit the file "distconfig.inc". Uncomment the following two lines:
$config->parentPath("/svn/repos");
$config->setTemplatePath("$locwebsvnreal/templates/BlueGrey/");
Save the file, and then rename it to "config.inc".
- Open up "http://yourhostname/WebSVN". If all went well, you should see a homepage that lists your repositories.
Customization
I had no real interest in customizing the look & feel of the online repository browsing experience, but found out that WebSVN has a great template system for this. This is what I did to change the header logo, other customizations will work in a similar way:
- Make a copy of one of the "WebSVN/templates" directories that you would like to use as a starting point. Rename your directory to a name of your choice. Let's assume we called it "MyStyle".
- Edit the file "WebSVN/includes/config.inc, change the line "$config->setTemplatePath("$locwebsvnreal/templates/BlueGrey/");" into "$config->setTemplatePath("$locwebsvnreal/templates/MyStyle/");"
- Go into the "MyStyle" directory and edit the look & feel. I added a new logo image, and changed the existing reference in the file "header.tmpl".

Do not underestimate the power of online repository browsing. Not only does it give you great insight into the life cycle of source code, it also creates an atmosphere of open innovation. Imagine you implement this for your department of developers, everybody's successes and failures will be surfaced to everybody! This puts the T back in Team.


Comments: 33
Reviews: 4
Average rating:
Highest rating: 5
Lowest rating: 4
COMMENT: ALINA RIMBU

MAY 4, 04:30:41 PM
Many thanks.
Alina Rimbu «
COMMENT: RYAN CONNELLY

MAY 30, 07:04:58 PM
"Please set up a repository path in include/config.inc using $config->parentPath or $config->addRepository."
When adding the repositories manually, websvn seems to work. Did anyone else have this issue?
Great article! «
COMMENT: SIMON
JUN 29, 08:52:39 PM
I am trying to install on Fedora Core 5, and have followed the simple instructions here, but when I try to view the repositories (http://localhost/WebSVN) I get the following errors:
Forbidden
You don't have permission to access /WebSVN on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
I tried changing the owership of the /var/www/html/WebSVN folder and subfolders to apache.apache., but this made no difference. Does anybody have any suggestions, or has anyone run into the same issue?
Thanks «
COMMENT: OM
AUG 5, 01:50:25 PM
I am using Wndow 2003 server with Apache2/php5.
........Waiting for someone to post some way to come out of it.
thnx «
COMMENT: DUP
AUG 7, 10:54:43 AM
1. Add an alias directive :
Alias /Websvn /var/www/websvn
2. Add a '+' in front of the "FollowSymLinks" Directive :
Options +FollowSymLinks
Hope this helps «
COMMENT: FERDY
AUG 7, 09:20:34 PM
Thanks. Although I did not face the issues mentioned by the others, it's really nice of you to post the solution. «
COMMENT: MICHELE
SEP 6, 09:17:46 AM
http://fedora.redhat.com/docs/selinux-apache-fc3/sn-simple-setup.html
the execution of following commands as root shuld be work.
"chmod -R apache.apache /var/www/html/websvn/"
"chcon -R -h -t httpd_sys_content_t /var/www/html/websvn/"
Hope this helps.
Thanks all.
bye «
COMMENT: MARC
OCT 31, 02:08:17 AM
COMMENT: BOB
NOV 1, 12:10:54 AM
This does not seem to work!
$config->addRepository("NameofProj","svn://myproj/proj");
Any work around? «
COMMENT: CHANDU

NOV 13, 11:12:33 AM
I installed Subversion in FC5 but, I don't know how to run Subversion in FC5.
If any one know about this please send a mail. «
COMMENT: MANISH PANT
DEC 19, 11:52:43 AM
I tried to use websvn for my repository but getting the error :
XML error: no element found (3) at line 3 column 0 byte 45
cmd: svn --non-interactive --config-dir /tmp log --xml --quiet 'https://172.21.164.51:1116/svn/EPMS_Project_Code/'
while clicking on the repository name at the first page located at
" https://172.21.164.51:1116/websvn "
here 'https://172.21.164.51:1116/svn/EPMS_Project_Code/' is my repository path.
Please help me out «
COMMENT: SYLVAIN
MAR 14, 15:25:39
I have the same problem that MANISH PANT
Please help us !! «
COMMENT: JAMES DICKEN

MAR 26, 07:46:50 PM
James «
COMMENT: NATHAN FLOREA
MAY 25, 08:00:50 PM
COMMENT: JEREMY
JUN 19, 12:44:28 PM
Jeremy «
COMMENT: RALPH CHILDERS

AUG 16, 11:35:48 PM
1) I put websvn under my iis root C:\Inetpub\wwwroot\websvn20.
2) point my browser to http://localhost/websvn20/index.php
And have no ideal what to do... currently looking at the screen. Help will be very welcome. «
COMMENT: MR. BEANS
AUG 22, 12:47:47
When I put websvn as a folder under localhost and change the 2lines in the config-file - I only get the error:
Fatal error: Cannot redeclare class config in \xampp\php\pear\Config.php on line 44
??? I know Linux makes it surely easier to handle but I am using windows, sorry «
COMMENT: ENTIDI

NOV 5, 04:44:47 PM
A little detail: include/distconfig.inc is now include/distconfig.php and MUST be renamed to include/config.php (I suppose it recently changed the name). Renaming in the old way (that is, to include/config.inc) will force PHP call the PEAR's config.php.
I think this could be the problem MR.BEANS and RALPH CHILDERS are facing. «
COMMENT: LION
NOV 16, 11:48:40 AM
Resolv: Add prefix "file:///" for your path to repository.
Example:
$config->addRepository("My Project Name", "/usr/local/sv_repo/My_Project/");
change to
$config->addRepository("My Project Name", "file:///usr/local/sv_repo/My_Project/");
and be happy
:) «
COMMENT: LION
NOV 16, 11:58:11 AM
I change setInputEncoding and setContentEncoding but i don't show any affects
.
WebSVN 2.0
OS: FreeBSD 5.3
Web server: 2.0
How to fix it?
Plz. write on to my e-mail. «
COMMENT: MISTERMARTIN75
FEB 4, 2008 - 09:22:26 AM
Resolution by Lion did not solve the problem. Running the command manually displays the XML log just the way it should, only WebSVN doesn't get it somehow.
Anybody been able to solve this? «
COMMENT: YOUNSS AZZAYANI
FEB 8, 2008 - 16:54:04
COMMENT: ANIRUDHA JADHAV
FEB 10, 2008 - 03:19:37 PM
ld.so.1: svn: fatal: libucb.so.1: open failed: No such file or directory
Killed
no idea how to resolve this or why i have this error «
COMMENT: JIMMY
FEB 11, 2008 - 09:43:39 PM
> Running the command manually displays the XML log just the way it should, only WebSVN doesn't get it somehow.
That probably works manually because you're not running the command as the same user that your apache runs under.
Check your apache's error log and see if there's an error listed there. My apache's log is located at /var/log/http/error_log; yours may be in a different place.
When I tried to run the command as my apache user, I got....
svn: PROPFIND request failed on '/svn/foo'
svn: PROPFIND of '/svn/foo':
Server certificate verification failed: issuer is not trusted (https://example.com) «
COMMENT: MIRA
FEB 13, 2008 - 09:37:12 PM
Our WebSVN is working and showing the repositories except that whenever I click on the different "link" features, the error_log in /var/log/httpd is showing the following message. And no files or diffs are displayed as a result.
svn: Can't open file '/root/.subversion/servers': Permission denied
I've removed the .subversion dir and replaced with a link to /var/www/.subversion which is owned by csvn. I've added root and apache to the csvn group in /etc/group. Why csvn? When I did a grep svn /etc/group it shows:
csvn:x:502:apache,root
What still needs to be done? I'm almost there (I hope).
thanks.
Mira «
COMMENT: MIRA
FEB 13, 2008 - 11:08:04 PM
Mira «
COMMENT: BRIAN

FEB 20, 2008 - 06:55:35 PM
My httpd.conf files contains:
LoadModule php5_module libexec/apache2/libphp5.so
DirectoryIndex index.html index.php index.html.var
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddHandler cgi-script .php
I can run 'php index.php' from the command line, save the data to out.html and view out.html from my browser.
However, when I try to run the index.php file directly, I get the following:
(8)Exec format error: exec of '/usr/local/www/data/websvn/index.php' failed
Premature end of script headers: index.php
The directly and file permissins seem okay. Does anyone have any idea of what could be wrong here?
Thank you in advance,
Brian «
COMMENT: DAREK
MAR 6, 2008 - 12:36:00
Error running this command: svn --config-dir /tmp --version
sh: /svn: No such file or directory «
COMMENT: IMEHESZ
MAR 8, 2008 - 09:05:56 PM
Error running this command: svn --non-interactive --config-dir /tmp log --xml --quiet --limit 1 'PATH_TO_MY_PROJ_REPO'
svn: /opt/lampp/lib/libcrypto.so.0.9.8: no version information available (required by /usr/lib/libneon.so.26)
svn: /opt/lampp/lib/libssl.so.0.9.8: no version information available (required by /usr/lib/libneon.so.26)
thanX
iM «
COMMENT: THAPER
APR 3, 2008 - 10:03:45 PM
thanks
COMMENT: MICHAEL
APR 9, 2008 - 02:12:12 PM
Solution for me: Set "safe_mod = Off" in php.ini.
COMMENT: MAARTEN
APR 15, 2008 - 16:42:43
ive just installed it from freebsd ports by doing the following
# install websvn from ports
sh> cd /usr/ports/devel/websvn
sh> sudo make install clean
# configure websvn
sh> sudo vi /usr/local/www/data/websvn/include/distconfig.php
# added line
$config->addRepository('MY main repository', 'file:///usr/home/svn/MYrepo', 'phpDEV');
vi>ESC :w /usr/local/www/data/websvn/include/config.php
vi>ESC :q
sh> sudo vi /usr/local/etc/apache22/httpd.conf
# added alias to apache
Alias /websvn /usr/local/www/data/websvn
Options Indexes FollowSymLinks MultiViews
Order deny,allow
Deny from all
AllowOverride FileInfo
allow from all
SSLRequireSSL
vi>ESC :wq
sh> apachectl restart «
COMMENT: MAJID
JUN 16, 2008 - 11:20:11 PM