0

I am trying to the same Apache as server for Subversion and Redmine (a RubyOnRails app). The current setup is Apache hosting Subversion using the standard mod_dav & mod_svn_dav and Redmine is running on mongrel in the same server on port 3000 with Apache mod_proxy_http forwarding to it.

I'm totally newbie in Apache, so the setup that I have is standard setup based on Subversion and Mongrel documentation. The problem is the standard mongrel configuration is as follow:


ProxyRequests off

<VirtualHost *:80>
    ServerName  xxx.xxx.xxx.xxx
    ServerAlias serverName

    ErrorLog      logs/error.log
    CustomLog     logs/access.log common

    ProxyPass /   http://xxx.xxx.xxx.xxx:3000/
    ProxyPassReverse / http://xxx.xxx.xxx.xxx:3000
    ProxyPreserveHost on

    ProxyPass /images !
    ProxyPass /stylesheets !

    Alias /images "C:\redmine-0.8.4\public\images"
    Alias /stylesheets "C:\redmine-0.8.4\public\stylesheets"
</VirtualHost>

And the Subversion config is as follow:


<Location /svn>
   DAV svn
   SVNParentPath "C:\svn_repository"
   AuthType Basic
   AuthName "Subversion Repository"
   AuthUserFile "C:\svn_repository\fat\http-auth-file"

   <LimitExcept GET PROPFIND OPTIONS REPORT>
     Require valid-user
   </LimitExcept>
</Location>

As showned above the mapping is '/' for Redmine and '/svn' for subversion, which is not working for me because the subversion access is being forwarded to mongrel server. From the documentation I have the impression that <Location> has higher priority than <VirtualHost>.

Anyway, the above setting doesn't work. If anybody can help me figure out the proper setting, I really appreciate it.

I also tried to change the VirtualHost setting to have the ProxyPass and ProxyPassReverse to map to '/redmine'. Which only works to forward the main page to mongrel, but the rest of the URL in Redmine application is not translated to have the extra '/redmine' in the URL.

So, my preference is the first setting with '/' forwarded to Redmine on Mongrel and '/svn' to for subversion. But if that is not possible, I'm open for the second option.

Thanks in advance.

DJ.
  • 3
  • 3

1 Answers1

0

It looks like you missed this:

ProxyRequests off

<VirtualHost *:80>
    ServerName  xxx.xxx.xxx.xxx
    ServerAlias serverName

    ErrorLog      logs/error.log
    CustomLog     logs/access.log common

    ProxyPass /   http://xxx.xxx.xxx.xxx:3000/
    ProxyPassReverse / http://xxx.xxx.xxx.xxx:3000
    ProxyPreserveHost on

    ProxyPass /images !
    ProxyPass /stylesheets !

    ### note the line below ###
    ProxyPass /svn !
    ### note the line above ###

    Alias /images "C:\redmine-0.8.4\public\images"
    Alias /stylesheets "C:\redmine-0.8.4\public\stylesheets"
</VirtualHost>

I'm pretty confident you just missed out on not doing ProxyPass for the /svn path

serverhorror
  • 6,478
  • 2
  • 25
  • 42
  • Thanks [Server Horror](http://serverfault.com/users/7936/server-horror), that point me to the right direction. In the beginning I tried as you suggested and it still failed. So I move the ProxyPass /svn ! to the top as the first ProxyPass rule and it worked. – DJ. Jun 09 '09 at 23:30