免费注册 查看新帖 |

Chinaunix

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

[Record]Subversion, Apache2 and SSL configure Build on Debian5 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-05 16:43 |只看该作者 |倒序浏览
#
# flyeee at hotmail dot com
#

1.# apt-get install subversion
2.# apt-get install apache2 apache2-utils
3.# apt-get install libapache2-svn
自动配置加载mod_dav.so and mod_dav_svn.so
4.# htpasswd -cm /etc/apache2/svnconf.d/.svn/proj_name_authz_svn.htpasswd name1
5.# mkdir /home/svnroot, chmod 700 /home/svnroot
6.# chown -R www-data:staff /home/svnroot
7.# svnadmin create proj_name
8.# chown -R www-data:staff proj_name
9.# cp /etc/apache2/sites-available/default-ssl /etc/apache2/sites-available/ssl

下面是 SSL 加密:
10.# a2dissite default-ssl   (disable default-ssl,为了enable 一个公共的 ssl)
11.# cd /etc/apaches2/site-enabled
12.# a2enmod ssl
执行下面这步,将在/etc/apaches2/site-enabled里 ssl (链接到 /etc/apache2/sites-available/ssl)
13.# a2ensite ssl
14.# make-ssl-cert generate-default-snakeoil --force-overwrite
15.# /usr/sbin/apache2-ssl-certificate
根据情况输入信息,将/etc/apache2/ssl 里生成 apache.pem 和它的符号链接

根据个人情况裁剪 /etc/apache2/sites-available/ssl 里的内容,至少添加下面的内容
SSLEngine On
SSLRequireSSL
SSLCertificateFile /etc/apache2/ssl/apache.pem

15.# /etc/init.d/apache restart

现将 /etc/apache2/sites-available/ssl 和 access.conf 贴上,不清楚就看本帖最后的内容:

----------------------------------------------------------------------------------------
  1 #
  2 # SSL Primary Configure
  3 # author: ...
  4 # July 5, 2009
  5 #
  6
  7 NameVirtualHost *:443  
  8
  9 <VirtualHost *:443>
10         ServerName yourname
11         ServerAdmin root@localhost
12
13       # ServerSignature On
14         SSLEngine On
15         SSLCertificateFile /etc/apache2/ssl/apache.pem
16
17         <Directory />
18                 Options FollowSymLinks
19                 AllowOverride None
20         </Directory>
21
22         DocumentRoot /var/www/
23         <Directory />
24                 Options FollowSymLinks
25                 AllowOverride None
26         </Directory>
27         <Directory /var/www/>
28                 Options Indexes FollowSymLinks MultiViews
29                 AllowOverride None
30                 Order allow,deny
31                 allow from all
32         </Directory>
33
34         ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
35         <Directory "/usr/lib/cgi-bin">
36                 AllowOverride None
37                 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
38                 Order allow,deny
39                 Allow from all
40         </Directory>
41
42         ErrorLog "/var/log/apache2/error_log"
43         TransferLog "/var/log/apache2/access_log"
44         CustomLog /var/log/apache2/ssl_access.log combined
45
46         BrowserMatch ".*MSIE.*" \
47                 nokeepalive ssl-unclean-shutdown \
48                 downgrade-1.0 force-response-1.0
49
50         #### Selection of Subversion
51         <Location /yourname>
52                 DAV svn
53                 SVNParentPath /home/svnroot/yourname/
54         #       SVNPathAuthz off
55
56                 AuthType Basic
57                 AuthName "Subversion Repository 1"
58
59                 AuthzSVNAccessFile /etc/apache2/yourname/access.conf
60                 AuthUserFile /etc/apache2/yourname/authz.htpasswd
61
62                 SSLRequireSSL
63                 Require valid-user
64         #       Satisfy Any
66         </Location>
67 </VirtualHost>
----------------------------------------------------------------------------------------
#
# Permission Control
# File: access.conf
# Date: xxxx
#

[groups]
task_admin = name1,name2
trunk =
branches =
tags =
developer =
supporter =

[/]
@task_admin = rw

[/trunk]

[/branches]

[/tags]

----------------------------------------------------------------------------------------

--

参考说明:
1.man something...
2.look up /usr/share/doc/apache2/README.Debian.gz
3.look up /etc/subversion/里的文件
4.look up 中文或英文《使用Subversion进行版本控制》
5.manage it youerself, ~ :~

[ 本帖最后由 tianzhilei 于 2009-9-3 13:15 编辑 ]

论坛徽章:
5
寅虎
日期:2015-01-20 09:16:52亥猪
日期:2015-01-21 14:43:44IT运维版块每日发帖之星
日期:2015-12-17 06:20:00每日论坛发贴之星
日期:2015-12-17 06:20:00每周论坛发贴之星
日期:2015-12-20 22:22:00
2 [报告]
发表于 2009-07-05 16:45 |只看该作者

楼主好
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP