Skip to content

Instantly share code, notes, and snippets.

@laiyonghao
Last active December 15, 2015 10:09
Show Gist options
  • Save laiyonghao/5243999 to your computer and use it in GitHub Desktop.
Save laiyonghao/5243999 to your computer and use it in GitHub Desktop.
<VirtualHost *:1081>
PerlLoadModule Apache::Redmine
<Location />
DAV svn
SVNParentPath "/opt/svn"
Order deny,allow
Deny from all
Satisfy any
# If a client tries to svn update which involves updating many files,
# the update request might result in an error Server sent unexpected
# return value (413 Request Entity Too Large) in response to REPORT
# request,because the size of the update request exceeds the limit
# allowed by the server. You can avoid this error by disabling the
# request size limit by adding the line LimitXMLRequestBody 0
# between the <Location...> and </Location> lines.
LimitXMLRequestBody 0
# Only check Authentication for root path, nor again for recursive
# folder.
# Redmine core does only permit access on repository level, so this
# doesn't hurt security. On the other hand it does boost performance
# a lot!
SVNPathAuthz off
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
PerlAccessHandler Apache::Authn::Redmine::access_handler
AuthType Basic
AuthName "Redmine SVN Repository"
Require valid-user
## AuthType Basic
# AuthName "Redmine SVN Repository"
# AuthUserFile /dev/null
#
# #read-only access
# <Limit GET PROPFIND OPTIONS REPORT>
# Require valid-user
## Allow from redmine.server.ip
# # Allow from another-ip
## Satisfy any
# </Limit>
# # write access
# <LimitExcept GET PROPFIND OPTIONS REPORT>
# Require valid-user
# </LimitExcept>
## for mysql
RedmineDSN "DBI:mysql:database=redmine;host=127.0.0.1"
## for postgres
# RedmineDSN "DBI:Pg:dbname=databasename;host=my.db.server"
## for SQLite3
# RedmineDSN "DBI:SQLite:dbname=database.db"
RedmineDbUser "redmine"
RedmineDbPass "red"
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment