# Re: SVN and Rails problem

**URL:** <https://www.ruby-forum.com/t/re-svn-and-rails-problem/114143>\
**Category:** Rails\
**Created:** [September 8, 2007, 2:26pm UTC](https://www.ruby-forum.com/t/re-svn-and-rails-problem/114143 "2007-09-08T14:26:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [September 8, 2007, 2:26pm UTC](https://www.ruby-forum.com/t/re-svn-and-rails-problem/114143/1 "2007-09-08T14:26:56Z")

</div>

I had to setup two virtual servers on my machine. One for the App and  
one for the svn server and I hit them with different urls. I’m running  
on a windows box with only one mongrel server but this has been working  
for me.

\<VirtualHost 192.168.1.100\>  
ServerName [abc.dyndns.org](http://abc.dyndns.org)  
ServerAlias [abc.dyndns.org](http://abc.dyndns.org)

ProxyPass / [http://127.0.0.1:8000/](http://127.0.0.1:8000/)  
ProxyPassReverse / [http://127.0.0.1:8000/](http://127.0.0.1:8000/)  
ProxyPreserveHost on  
  
\<VirtualHost 192.168.1.100\>  
ServerName [xyz.dyndns.org](http://xyz.dyndns.org)  
ServerAlias [xyz.dyndns.org](http://xyz.dyndns.org)

### Added for SVN

\<Location /svn\>  
DAV svn  
SVNListParentPath on  
SVNParentPath C:\repos  
AuthType Basic  
AuthName “Subversion repositories”  
AuthUserFile passwd  
AuthzSVNAccessFile svnaccessfile  
Require valid-user

----- Original Message ----  
From: Jim N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: removed\_email\_address@domain.invalid  
Sent: Saturday, September 8, 2007 7:22:15 AM  
Subject: [Rails] SVN and Rails problem

Hi guys,

I’ve finally managed to get my server up and running with  
mongrel\_cluster and all that jazz. My rails app works fine, but when I  
try to access my svn repos as I was doing before everything was setup  
rail is giving me a 404.

What can I add to my httpd.conf to prevent this? Here’s a snip from my  
httpd.conf relating to the domain:

—HTTPD.CONF---------------------------

\<VirtualHost 75.126.60.178:80\>  
ServerName [fapbox.com](http://fapbox.com)  
ServerAlias [www.fapbox.com](http://www.fapbox.com)  
DocumentRoot /home/fapbox/current/public  
ServerAdmin removed\_email\_address@domain.invalid  
UseCanonicalName Off  
CustomLog /usr/local/apache/domlogs/fapbox.com combined  
CustomLog /usr/local/apache/domlogs/fapbox.com-bytes\_log “%{%s}t %I  
.\n%{%s}t %O .”  
\<IfModule !mod\_disable\_suexec.c\>  
SuexecUserGroup fapbox fapbox  
  
ScriptAlias /cgi-bin/ /home/fapbox/public\_html/cgi-bin/

```
<Location /svn>
    DAV svn
    SVNParentPath /usr/local/svn/repos/private
    AuthType Basic
    AuthName "Fapbox Subversion Repository"
    AuthUserFile /usr/local/svn/users/passwords
    Require valid-user
</Location>

RewriteEngine On

# Rewrite domain.com to www.domain.com
RewriteCond %{HTTP_HOST} ^fapbox.com$ [NC]
RewriteRule ^(.*)$ http://www.fapbox.com$1 [R=301,L]

# 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 text/javascript text/css  
BrowserMatch ^Mozilla/4 gzip-only-text/html  
BrowserMatch ^Mozilla/4.0[678] no-gzip  
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

-- Posted via http://www.ruby-forum.com/.
