svn搭建完毕出现500错误原因之一
出现500的原因是由于配置的时候少生成了授权文件,通过锁定服务器的日志文件 tail -f/var/log/apache2/error.log 得到的错误日志如下:
Could not fetch resource information.
Could not open the requested SVN filesystem
Could not open the requested SVN filesystem
caught SIGTERM, shutting down
Apache/2.2.16 (Ubuntu) DAV/2 SVN/1.6.12 configured -- resuming normal operations
caught SIGTERM, shutting down
Apache/2.2.16 (Ubuntu) DAV/2 SVN/1.6.12 configured -- resuming normal operations
caught SIGTERM, shutting down
Apache/2.2.16 (Ubuntu) DAV/2 SVN/1.6.12 configured -- resuming normal operations
(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
页:
[1]