administration mode

 

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: rating
Highest rating: 5
Lowest rating: 4

COMMENT: ALINA RIMBU emailrating

MAY 4, 04:30:41 PM

comment » I used thes einstructions to install Subversion on RedHat.

Many thanks.

Alina Rimbu «

COMMENT: RYAN CONNELLY emailhomepage

MAY 30, 07:04:58 PM

comment » I had some trouble installing the WebSVN. After setting the parent path, I still got the message:

"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 email

JUN 29, 08:52:39 PM

comment » Hi,

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

comment » I am also facing same problem as mension above by RYAN.

I am using Wndow 2003 server with Apache2/php5.

........Waiting for someone to post some way to come out of it.

thnx «

COMMENT: DUP homepage

AUG 7, 10:54:43 AM

comment » Two issues described here can be solved by editing the apache websvn.conf file :

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

comment » Dup,

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

comment » For the "403 Forbidden error" please refer to

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 rating

OCT 31, 02:08:17 AM

comment » Very useful tutorial. Thanks «

COMMENT: BOB

NOV 1, 12:10:54 AM

comment » Is it possible to add Repository in the form of a URL instead of path to local svn directory?

This does not seem to work!

$config->addRepository("NameofProj","svn://myproj/proj");

Any work around? «

COMMENT: CHANDU emailhomepage

NOV 13, 11:12:33 AM

comment » Hi,

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 email

DEC 19, 11:52:43 AM

comment » Hi,

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 email

MAR 14, 15:25:39

comment » Hi,

I have the same problem that MANISH PANT

Please help us !! «

COMMENT: JAMES DICKEN emailhomepage

MAR 26, 07:46:50 PM

comment » That error is caused by Apache not having permission to access the repository. I had a similar problem. Is the server on the same machine as WebSVN?

James «

COMMENT: NATHAN FLOREA

MAY 25, 08:00:50 PM

comment » The problem with $config->parentPath mentioned above is that you have to go a level above your repository. For example, my repos is at /usr/local/svn. That is what contains my db, hooks, etc. directories. So I have to use "/usr/local", NOT "/usr/local/svn", i.e. $config->parentPath("/usr/local"). This took me a frustratingly long time to figure out. It wasn't until I actually looked at the code that I figured it out. I might submit a patch to the text in the example config file to make that clearer. Hopefully this will help anyone who happens across this page while googling for the solution like I did. «

COMMENT: JEREMY email

JUN 19, 12:44:28 PM

comment » Thanks for the instruction they work great. One question with WebSVN thou. Is there a way to limit the access to this site? Does this have to be done in the /etc/httpd/conf/httpd.conf file? Thanks

Jeremy «

COMMENT: RALPH CHILDERS emailhomepage

AUG 16, 11:35:48 PM

comment » Has any one seen this after installing Websvn: Error running this command: svn --config-dir /tmp --version

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

comment » I think I am too stupid for that - running apache on xp and use tortoiseSVN.

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 emailhomepage

NOV 5, 04:44:47 PM

comment » I've downloaded view WebSVN-2.0 and, after a little work, all runs perfectly: very impressive.

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 email

NOV 16, 11:48:40 AM

comment » Problem: XML error: no element found (3) at line 3 column 0 byte 45

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 01 :) «

COMMENT: LION email

NOV 16, 11:58:11 AM

comment » Problem: Don't show Cyrillic text in my source file. (code page windows 1251)

I change setInputEncoding and setContentEncoding but i don't show any affects 09 .

WebSVN 2.0

OS: FreeBSD 5.3

Web server: 2.0

How to fix it?

Plz. write on to my e-mail. «

COMMENT: MISTERMARTIN75 email

FEB 4, 2008 - 09:22:26 AM

comment » Problem: XML error: no element found (3) at line 3 column 0 byte 45

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 email

FEB 8, 2008 - 16:54:04

comment » Thank you man , very helpful guide ;) «

COMMENT: ANIRUDHA JADHAV email

FEB 10, 2008 - 03:19:37 PM

comment » Error running this command: /usr/local/bin/svn --config-dir /tmp --version

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 email

FEB 11, 2008 - 09:43:39 PM

comment » @MISTERMARTIN75: Problem: XML error: no element found (3) at line 3 column 0 byte 45

> 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 rating

FEB 13, 2008 - 09:37:12 PM

comment » Thanks, Ferdy, for sharing your experience.

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

comment » I finally got this working...the only step that's missing is to add o+rx permission to root

Mira «

COMMENT: BRIAN emailhomepage

FEB 20, 2008 - 06:55:35 PM

comment » Hello - I have installed WebSVN using an updated ports tree on FreeBSD v6.2. It installed and configured: Apache/2.0.59 (FreeBSD) DAV/2 SVN/1.4.3 PHP/5.2.0 with Suhosin-Patch Server.

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

comment » And I've got message:

Error running this command: svn --config-dir /tmp --version

sh: /svn: No such file or directory «

COMMENT: IMEHESZ homepage

MAR 8, 2008 - 09:05:56 PM

comment » hello. almost perfect ;) has anybody installed this with xampp? i set up the WebSVN as shown here, it is listing my repositories (yay!) but when I click on the links i got this message:

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 email

APR 3, 2008 - 10:03:45 PM

comment » Right... well i change the $config->parentPath('/var/svn/repos'); to $config->parentPath('/var/svn/repos/steve'); or anything else and the web page always shows the original set directory... it never changes and I do CTL-R to refresh the page and restart the web server and still the same.... always the first parent directory I set it at... I cant change it!

thanks

03 «

COMMENT: MICHAEL

APR 9, 2008 - 02:12:12 PM

comment » >> Error running this command: /usr/local/bin/svn --config-dir /tmp --version

Solution for me: Set "safe_mod = Off" in php.ini.

25 «

COMMENT: MAARTEN rating

APR 15, 2008 - 16:42:43

comment » short and simple!!!

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

comment » "Installation of WebCVS is a joy" should be "Installation of WebSVN is a joy" ;) «

RATE THIS CONTENT (OPTIONAL)
Was this document useful to you?
 
rating Awesome
rating Good
rating Average
rating Poor
rating Useless
CREATE A NEW COMMENT
required field
required field HTML is not allowed. Hyperlinks will automatically be converted.
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30