Apache mod_proxy with tomcat and svn

坚强是说给别人听的谎言 提交于 2019-12-11 09:44:19

问题


I have tomcat configured to take the root "/" of the webserver

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

I am able to exclude certain path from proxying as follows:

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

I want to exclude /svn path from routing to http://localhost:8081/. However the same approach doesn't work for /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>

In this case I get routed to tomcat app's 404 not found page. I have noticed that if I comment out the Require, and AuthType lines I get correct routing, but svn is not functional.

<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>

My guess is that if I include Auth* Directives the load order gets messed up. Any help is welcome.

来源:https://stackoverflow.com/questions/31271434/apache-mod-proxy-with-tomcat-and-svn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!