Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
You may want to edit your entry and replace the < characters with &lt; (assuming this entry hasn't been munged) –  David Pashley Jun 9 '09 at 22:56

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer
    
Thanks 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 9 '09 at 23:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.