apache svn在linux下的问题
我在linux下配置apache+svn,所有的配置都设置好后,结果用svn://在命令行可以进行操作,用http://不可以,在浏览器中用http://也不可以访问,这是怎么回事啊?哪位高手指点一下,谢了
版本分别是httpd-2.0.58和subversion-1.4.3,安装参数如下:
http: ./configure --prefix=/usr/local/apache --enable-ssl --enable-static-htpasswd --enable-static-rotatelogs --enable-dav --enable-info --enable-cgi --enable-cgid --enable-dav-fs --enable-so --enable-exception-hook --enable-maintainer-mode --enable-charset-lite --enable-example --enable-log-forensic --enable-mime-magic --enable-headers --enable-usertrack --enable-version --enable-static-support --enable-http CFLAGS=-DBIG_SECURITY_HOLE
svn: ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr/ --enable-static --enable-dso --enable-maintainer-mode --enable-shared
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你应该是 http的 svn模块 没有配置好
这个是我做的时候自己写的笔记
希望有帮助.
1. download source code
1. download the source code of the following softwares
SVN: Subversion 1.4.4
HTTPD: Apache Httpd 2.2.4
APR: Apache Apr 1.2.8
APU: Apache Apr-Util 1.2.8
2. compile and install (follow the step):
(1) Apache Apr
# cd apr-1.2.8
# ./configure --prefix=/usr/local/apr
# make
# make install
(2) Apache Apr-Util
# cd apr-util-1.2.8
# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
# make
# make install
(3) Apache Httpd
# cd httpd-2.2.4
# ./configure --prefix=/usr/local/httpd --enable-dav --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
# make
# make install
(4) Subversion
# cd subversion-1.4.3
# ./configure --prefix=/usr/local/subversion --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-apxs=/usr/local/httpd/bin/apxs
# make
# make install
check WebDav? for SVN modules:
# cd /usr/local/httpd/modules
check mod_dav_svn.so 和 mod_authz_svn.so, you should see them if everything is ok
3. create svn reporsitory:
$ cd /home/svn
$ svnadmin create Test initenv
4. configure Apache Httpd
# cd /usr/local/httpd/conf
# vi httpd.conf
to Load webDav for SVN modules:
# # Dynamic Shared Object (DSO) Support
# # To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule?' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule? foo_module modules/mod_foo.so
LoadModule? dav_svn_module modules/mod_dav_svn.so
LoadModule? authz_svn_module modules/mod_authz_svn.so
add follow context:
<Location /svn>
DAV svn
AuthType? Basic
SVNListParentPath on
SVNParentPath /home/svn
AuthName? "Subversion Repository"
AuthUserFile? /usr/local/httpd/conf/svn/svn.passwd
AuthzSVNAccessFile /xxx/accesspolicy
Require valid-user
</Location>
mkdir /usr/local/httpd/conf/svn
htpasswd -c /usr/local/httpd/conf/svn/svn.passwd
edit /xxx/accesspolicy
[groups]
admin = user1,user2
developers = user3,user4
[ /project1]
@admin = rw
@developers = rw
5. configure https
to generate CA, server certificates
edit httpd.cpnf
# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf
edit extra/httpd-ssl.conf to specify the location of the certificates
6. restart httpd
你的Apache配置了没有
假设我们现在要将一个名为 Lair 的项目导入到 SVN中
1). Apache的配置
在 conf/httpd.conf 或 conf/extra/httpd-vhosts.conf 中加入
<Location /svn/Lair>
DAV svn
SVNPath /home/svn/Lair
</Location>
可以参考以下apache的配置,实现数据加密传输,用户身份验证.
Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl.
SSLPassPhraseDialog exec:/etc/sendsslpwd
SSLSessionCache shmcb:/usr/local/apache2/logs/ssl_scache(512000)
SSLSessionCacheTimeout 300
SSLMutex file:/usr/local/apache2/logs/ssl_mutex
<VirtualHost _default_:443>
DocumentRoot /var/SVNRoot
ServerName svn.yousite.com:443
ServerAdmin webmaster@yousite.com
<Location />
DAV svn
SVNPath /var/SVNRoot
AuthzSVNAccessFile /etc/svnserve.conf
Satisfy Any
AuthType Basic
AuthName “yousite SVN Repository”
AuthUserFile /etc/httpd-passwords.txt
Require valid-user
</Location>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/ssl/server.crt
SSLCertificateKeyFile /etc/ssl/server.key
</VirtualHost>
更详细的配置说明文档 http://svnbook.red-bean.com/nigh ... d_dav_svn.conf.html