Redirecting to /bin/systemctl restart httpd.service

来自ling
跳转至: 导航搜索


http://www.ling2.cn:81/svn/ling/trunk/ http://www.ling2.cn/svn/ling/trunk/


/bin/systemctl start httpd.service
 <Location /svn>
	   DAV svn
	   SVNParentPath /alidata/svndata
	 
	#   # Limit write permission to list of valid users.
	#   <LimitExcept GET PROPFIND OPTIONS REPORT>
	#      # Require SSL connection for password protection.
	#      # SSLRequireSSL
	#
	      AuthType Basic
	      AuthName "Authorization SVN"
	      AuthzSVNAccessFile /alidata/svndata/authz
	      AuthUserFile /alidata/svndata/passwd
	      Require valid-user
 #   </LimitExcept>
 </Location>

	location /svn {
		proxy_pass http://127.0.0.1:81/svn;
		proxy_redirect default;
	}

server{
	listen 8443;
	location / {
		proxy_pass http://www.ling2.cn:8443/;
		proxy_redirect default;
	}
}
这里用到参数-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


现在,需要设置路径访问权限文件AuthzSVNAccessFile /etc/apache2/dav_svn.authz。
我们先做一个默认的配置,当前这个文件还不存在:

[plain] view plain copy
sudo vi /etc/apache2/dav_svn.authz    

然后追加:
引用

[zlex:/]
* = r

这样,所有授权用户就都能够看到zlex项目了!