Re: SVN and Rails problem

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
ServerAlias abc.dyndns.org

ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
ProxyPreserveHost on

<VirtualHost 192.168.1.100>
ServerName xyz.dyndns.org
ServerAlias 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. [email protected]
To: [email protected]
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
ServerAlias www.fapbox.com
DocumentRoot /home/fapbox/current/public
ServerAdmin [email protected]
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/.