Apache mod_proxy与tomcat和svn

时间:2015-07-07 14:27:46

标签: java apache tomcat svn mod-proxy

我已将tomcat配置为获取网络服务器的根“/”

<Location />
    ProxyPass http://localhost:8081/
    ProxyPassReverse http://localhost:8081/
</Location>

我能够从代理中排除某些路径,如下所示:

<Location /robots.txt>
    ProxyPass !
</Location>

我想将/ svn路径从路由排除到http://localhost:8081/。但是,相同的方法不适用于/ svn setup

<Location /svn>
    ProxyPass !

    DAV svn

    SVNParentPath /home/svn/repos
    SVNListParentPath On
    SVNMasterURI http://www.domain.com/svn

    AuthType Basic
    AuthBasicProvider file
    AuthName "Subversion server"

    # file setup
    AuthBasicAuthoritative  off
    AuthUserFile /home/svn/conf/svn_passwdfile

    # Limit write permission to list of valid users.
    AuthzSVNAccessFile /home/svn/conf/access

    Require valid-user
</Location>

在这种情况下,我被路由到tomcat应用程序的404找不到的页面。 我注意到如果我注释掉Require和AuthType行,我会得到正确的路由,但svn不起作用。

<Location /svn>
    ProxyPass !

    DAV svn

    SVNParentPath /home/svn/repos
    SVNListParentPath On
    SVNMasterURI http://www.domain.com/svn

    #AuthType Basic
    AuthBasicProvider file
    AuthName "Subversion server"

    # file setup
    AuthBasicAuthoritative  off
    AuthUserFile /home/svn/conf/svn_passwdfile

    # Limit write permission to list of valid users.
    AuthzSVNAccessFile /home/svn/conf/access

    #Require valid-user
</Location>

我的猜测是,如果我包含Auth *指令,则加载顺序会搞砸。欢迎任何帮助。

0 个答案:

没有答案