我已經想通了我的問題,並提出了一個相當簡單的解決方案。我的假設是正確的 - 因爲Redmine不知道如何處理LDAP請求,所以它扔了一個404.
下面是正確的Apache配置,允許Redmine(或任何在同一臺服務器上運行的服務)通過身份驗證過程:
<Location /svn>
# The following two lines allow for any request made by this machine through
# We do this to allow Redmine to have access without needing to authenticate against LDAP
# NOTE: The IP address MUST be the one given by DHCP - the loop-back (127.0.0.1) will NOT WORK
Order allow,deny
Allow from ACTUAL_IP_ADDRESS (example: 123.45.67.100)
# The following authenticates against LDAP for any request NOT made by the same server
# This includes anyone attempting to access:
# http://myserver.com/svn/*
# either via web-browser, or svn command
#
# Tell apache this is a subversion repository
DAV svn
# Where the subversion repository list exists on the file system
SVNParentPath "/var/svn"
# What kind of authentication
AuthType Basic
AuthName "Restricted Subversion Content"
AuthBasicProvider ldap
AuthLDAPBindDN "YOUR_BIND_DN"
AuthLDAPBindPassword "YOUR_BIND_PASSWORD"
AuthLDAPURL "YOUR_LDAP_URL"
# Require a valid-LDAP user (if not from the allowed IP address)
Require valid-user
# This line (very important) tells Apache that the request needs to follow AT LEAST
# one of the following:
# - The request is from the IP address listed above
# - All others MUST authenticate using LDaP
# If we wanted BOTH to be required (not in our case), we would use "Satisfy All"
Satisfy Any
我希望這可以幫助別人尋找一個類似的解決方案!