有几件事要尝试。
首先这是我的config.php
:
$config->parentPath('/proj/lamolabs.org/scm/svn');
$config->addTemplatePath($locwebsvnreal.'/templates/calm/');
$config->useTreeIndex(true); // Tree index, open by default
$config->setShowLastModInListing(true);
$config->addInlineMimeType('text/plain');
$config->allowDownload();
$config->setMinDownloadLevel(2);
$config->useGeshi();
set_time_limit(0);
$config->expandTabsBy(2);
其次,我/etc/init.d/svnserve
为 svnserve 设置了自己的启动/停止脚本:
#!/bin/bash
# Control script for the Subversion daemon
#
# chkconfig: 2345 89 40
# description: Subversion daemon
#
# processname: svnserve
source /etc/rc.d/init.d/functions
[ -x /usr/bin/svnserve ] || exit 1
### Default variables
SYSCONFIG="/etc/sysconfig/subversion"
### Read configuration
[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
RETVAL=0
prog="svnserve"
desc="Subversion daemon"
start() {
echo -n $"Starting $desc ($prog): "
daemon $prog -d $OPTIONS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
echo
}
stop() {
echo -n $"Shutting down $desc ($prog): "
killproc $prog
RETVAL=$?
[ $RETVAL -eq 0 ] && success || failure
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
RETVAL=$?
;;
condrestart)
[ -e /var/lock/subsys/$prog ] && restart
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart}"
RETVAL=1
esac
exit $RETVAL
第三,我设置了一个配置文件/etc/sysconfig/subversion
,svnserve
# Configuration file for the Subversion service
#
# To pass additional options (for instace, -r root of directory to server) to
# the svnserve binary at startup, set OPTIONS here.
#
#OPTIONS=
OPTIONS="--threads --root /proj/lamolabs.org"
我在我的博客上写了一篇题为:Git and subversion setup on CentOS 5的文章,讲述了我是如何设置它的。该帖子包含一些可能有用的附加信息。
让我知道你是怎么做到的,我很想知道你的设置是怎么回事。
编辑#2
/etc/httpd/conf.d/subversion.conf
:
<VirtualHost *:80>
UseCanonicalName Off
ServerName websvn.lamolabs.org
ServerAlias websvn.bubba.net
DocumentRoot /var/www/websvn/current
<Directory /var/www/websvn/current>
Allow from all
</Directory>
</VirtualHost>