免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4578 | 回复: 2
打印 上一主题 下一主题

apache svn在linux下的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-01 14:57 |只看该作者 |倒序浏览
我在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

论坛徽章:
0
2 [报告]
发表于 2007-08-02 11:43 |只看该作者
你的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

论坛徽章:
0
3 [报告]
发表于 2007-08-02 11:47 |只看该作者
你应该是 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
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP