# Apache mod\_proxy mongrel\_cluster and subversion http

**URL:** <https://www.ruby-forum.com/t/apache-mod-proxy-mongrel-cluster-and-subversion-http/104741>\
**Category:** Rails\
**Created:** [May 22, 2007, 12:28am UTC](https://www.ruby-forum.com/t/apache-mod-proxy-mongrel-cluster-and-subversion-http/104741 "2007-05-22T00:28:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Kinney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e8c25b/32.png) [@Jonathan\_Kinney](https://www.ruby-forum.com/u/Jonathan_Kinney)\
**Post date:** [May 22, 2007, 12:28am UTC](https://www.ruby-forum.com/t/apache-mod-proxy-mongrel-cluster-and-subversion-http/104741/1 "2007-05-22T00:28:32Z")

</div>

Hello everyone,

I have a site setup where I need to have svn access and my rails app  
accessible on the same IP. Right now I can only seem to have one or the  
other.

This is a production environment… I’m running Ubuntu 7.04 server with  
apache2 and mod\_proxy serving rails requests to 2 mongrel servers via  
mongrel\_cluster and it works great to serve the app when I use this  
httpd.conf file (I modified domain specific info to be generic) Also the  
basic authentication is just because this is 80% developed app running  
on a  
test production server. I didn’t want everyone and anyone in the company  
I’m  
developing this for to have access just by hitting the url. At least  
with  
basic auth it would take some effort to see the site without a username  
and  
password which no one involved in this project would care to do. So for  
all  
intent and purpose…ignore the basic auth! I know it sucks!

However if the below httpd.conf file is in place then all the sudden my  
subversion repository is no longer accessable via dav\_svn at  
[http://subdomain.domain.com/svn/appname/trunk](http://subdomain.domain.com/svn/appname/trunk)

Is there a way to have both dav\_svn http subversion access to my  
repository  
and also serve the rails application? Please see httpd.conf file below.

Thanks!

\<VirtualHost \*:80\>  
ServerName [subdomain.domain.com](http://subdomain.domain.com)

DocumentRoot /var/www/appname/current/public

\<Directory “/var/www/appname/current/public”\>  
AuthType Basic  
AuthName “Authentication Required to access site”  
AuthUserFile “/home/administrator/.htpasswd”  
Require valid-user

```
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

```

\<Proxy balancer://mongrel\_cluster\>  
BalancerMember [http://127.0.0.1:8000](http://127.0.0.1:8000)  
BalancerMember [http://127.0.0.1:8001](http://127.0.0.1:8001)

RewriteEngine On

# Uncomment for rewrite debugging

#RewriteLog logs/myapp\_rewrite\_log  
#RewriteLogLevel 9

# Check for maintenance file and redirect all requests

RewriteCond %{DOCUMENT\_ROOT}/system/maintenance.html -f  
RewriteCond %{SCRIPT\_FILENAME} !maintenance.html  
RewriteRule ^.\*$ /system/maintenance.html [L]

# Rewrite index to check for static

RewriteRule ^/$ /index.html [QSA]

# Rewrite to check for Rails cached page

RewriteRule ^([^.]+)$ $1.html [QSA]

# Redirect all non-static requests to cluster

RewriteCond %{DOCUMENT\_ROOT}/%{REQUEST\_FILENAME} !-f  
RewriteRule ^/(.\*)$ balancer://mongrel\_cluster%{REQUEST\_URI} [P,QSA,L]

# Deflate

AddOutputFilterByType DEFLATE text/html text/plain text/xml  
application/xml application/xhtml+xml$  
BrowserMatch ^Mozilla/4 gzip-only-text/html  
BrowserMatch ^Mozilla/4.0[678] no-gzip  
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# Uncomment for deflate debugging

#DeflateFilterNote Input input\_info  
#DeflateFilterNote Output output\_info  
#DeflateFilterNote Ratio ratio\_info  
#LogFormat ‘“%r” %{output\_info}n/%{input\_info}n (%{ratio\_info}n%%)’  
deflate  
#CustomLog logs/myapp\_deflate\_log deflate

ErrorLog logs/appname\_errors\_log  
CustomLog logs/appname\_log combined
