我刚将我的Subversion仓库从一个老的FreeBSD服务器迁移到了一个新的Ubuntu 16服务器,并配合使用了Apache 2.4。我在“sites-available”中配置了一个新站点并重启了Apache,但是出现了以下错误:
[so:warn] [pid 15619] AH01574: module dav_module已经被加载,跳过
看起来所有与dav相关的模块都不同。我没有看到dav_module被加载两次:
# cd /etc/apache2
# grep -rI "LoadModule" * | grep dav
mods-available/dav_fs.load:LoadModule dav_fs_module /usr/lib/apache2/modules/mod_dav_fs.so
mods-available/dav_svn.load:LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so
mods-available/dav.load:LoadModule dav_module /usr/lib/apache2/modules/mod_dav.so
mods-available/dav_lock.load:LoadModule dav_lock_module /usr/lib/apache2/modules/mod_dav_lock.so
除了Subversion和Apache之外,我还安装了以下软件包:
# apt-get install subversion-tools libapache2-svn
我注意到安装过程中已经加载了模块(a2enmod),所以我在这方面没有做任何事情。
这是我的虚拟主机配置:
<VirtualHost *:443>
DocumentRoot /var/www/subversion
ServerName svn.domain.com
ErrorLog "|/usr/bin/rotatelogs -l /var/log/subversion/svn-error.%Y.%m.%d 86400"
CustomLog /var/log/subversion/svn-access_log "%t %u %{SVN-ACTION}e" env=SVN-ACTION
<Location "/">
DAV svn
SVNPath /var/www/subversion
#Authenticated users only
Require valid-user
# authenticating them valid ones
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /var/www/passwd/.htpasswd-svn
order deny,allow
deny from all
satisfy any
</Location>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCACertificateFile /etc/ssl/local_certs/2018-domain.com/intermediate.crt
SSLCertificateFile /etc/ssl/local_certs/2018-domain.com/public.crt
SSLCertificateKeyFile /etc/ssl/local_certs/2018-domain.com/private.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
BrowserMatch ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
<Directory /var/www/subversion>
Options -Indexes
</Directory>
</VirtualHost>
尽管出现了这个警告,但一切都很正常,不过消除它仍然是件好事。