Version 5 (modified by mitty, 14 years ago) (diff) |
---|
Subversion
Apache options
- Authorization Options > Blanket access control
- The parameters present on the Limit and LimitExcept directives are HTTP request types that are affected by that block. For example, if you wanted to disallow all access to your repository except the currently supported read-only operations, you would use the LimitExcept directive, passing the GET, PROPFIND, OPTIONS, and REPORT request type parameters. Then the previously mentioned Require valid-user directive would be placed inside the <LimitExcept> block instead of just inside the <Location> block.
<Location /svn> DAV svn SVNParentPath /var/svn # how to authenticate a user AuthType Basic AuthName "Subversion repository" AuthUserFile /path/to/users/file # For any operations other than these, require an authenticated user. <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location>
- The parameters present on the Limit and LimitExcept directives are HTTP request types that are affected by that block. For example, if you wanted to disallow all access to your repository except the currently supported read-only operations, you would use the LimitExcept directive, passing the GET, PROPFIND, OPTIONS, and REPORT request type parameters. Then the previously mentioned Require valid-user directive would be placed inside the <LimitExcept> block instead of just inside the <Location> block.
- 単純にRead-onlyにしたければ以下のようにすればよい see also #11
RedirectMatch ^/svn$ /svn/ <Location /svn/> # Requests for a collection must have a trailing slash on the URI. DAV svn SVNParentPath /path/to/svn SVNListParentPath on Order Allow,Deny Allow from all <LimitExcept GET PROPFIND OPTIONS REPORT> # read-only svn access Order Allow,Deny Deny from all </LimitExcept> </Location>