六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 137|回复: 0

svn搭建完毕出现500错误原因之一

[复制链接]

升级  60%

36

主题

36

主题

36

主题

秀才

Rank: 2

积分
140
 楼主| 发表于 2013-1-15 13:28:07 | 显示全部楼层 |阅读模式
出现500的原因是由于配置的时候少生成了授权文件,
通过锁定服务器的日志文件 tail -f  /var/log/apache2/error.log 得到的错误日志如下:
[Sat Aug 25 09:16:33 2012] [error] [client 192.168.1.101] Could not fetch resource information.  [500, #0]
[Sat Aug 25 09:16:33 2012] [error] [client 192.168.1.101] Could not open the requested SVN filesystem  [500, #2]
[Sat Aug 25 09:16:33 2012] [error] [client 192.168.1.101] Could not open the requested SVN filesystem  [500, #2]
[Sat Aug 25 09:20:07 2012] [notice] caught SIGTERM, shutting down
[Sat Aug 25 09:20:08 2012] [notice] Apache/2.2.16 (Ubuntu) DAV/2 SVN/1.6.12 configured -- resuming normal operations
[Sat Aug 25 09:49:34 2012] [notice] caught SIGTERM, shutting down
[Sat Aug 25 09:49:36 2012] [notice] Apache/2.2.16 (Ubuntu) DAV/2 SVN/1.6.12 configured -- resuming normal operations
[Sat Aug 25 10:05:05 2012] [notice] caught SIGTERM, shutting down
[Sat Aug 25 10:05:06 2012] [notice] Apache/2.2.16 (Ubuntu) DAV/2 SVN/1.6.12 configured -- resuming normal operations
[Sat Aug 25 10:17:37 2012] [error] [client 192.168.1.101] (2)No such file or directory: Could not open password file: /etc/apache2/dav_svn.passwd
解决方法是生成对应的文件:
现在通过命令设置SVN账户:
Shell代码  收藏代码

   1. sudo htpasswd -c /etc/apache2/dav_svn.passwd <username>  

sudo htpasswd -c /etc/apache2/dav_svn.passwd <username>


这里用到参数-c,是因为/etc/apache2/dav_svn.passwd文件不存在,如果文件存在,则无需该参数!否则,将覆盖掉原有密码文件!
形如:
引用
sudo htpasswd -c /etc/apache2/dav_svn.passwd snowolf
New password:
Re-type new password:
Updating password for user snowolf

可以追加多个账户!
引用
sudo htpasswd /etc/apache2/dav_svn.passwd zlex
New password:
Re-type new password:
Updating password for user zlex
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表