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 admin-oXF/OrpwZ1rQT0dZR+AlfA@public.gmane.org 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 </IfModule> 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 </VirtualHost> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
mark-h9LRGznmPqMAvxtiuMwx3w@public.gmane.org
2007-Sep-08 12:26 UTC
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> <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 </Location> </VirtualHost> ----- Original Message ---- From: Jim Neath <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 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 admin-oXF/OrpwZ1rQT0dZR+AlfA@public.gmane.org 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 </IfModule> 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 </VirtualHost> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
By the way my repository is located www.fapbox.com/svn/fapbox -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jim Neath wrote:> 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.I usually find it easier to create a separate subdomain for Subversion, say svn.example.com. Then you can have a separate virtualhost for your repository and won''t have to fiddle too much with Apache routing. -- Cheers, - Jacob Atzen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jacob Atzen wrote:> Jim Neath wrote: >> 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. > > I usually find it easier to create a separate subdomain for Subversion, > say svn.example.com. Then you can have a separate virtualhost for your > repository and won''t have to fiddle too much with Apache routing. > > -- > Cheers, > - Jacob AtzenThanks Jacob, I don''t suppose you have an example of how I would do this. I''m not very good with server type stuff. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jim Neath wrote:> Jacob Atzen wrote: >> Jim Neath wrote: >>> 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. >> I usually find it easier to create a separate subdomain for Subversion, >> say svn.example.com. Then you can have a separate virtualhost for your >> repository and won''t have to fiddle too much with Apache routing. >>> I don''t suppose you have an example of how I would do this. I''m not very> good with server type stuff.You will need to setup the subdomain in DNS. Then you will need to restore your previous virtualhost config (the one where svn was working). Keep your current virtualhost (the one where your Rails app is working) and add the svn one so you have two separate virtualhosts. My virtualhost for svn looks like this (except I changed the domain): <VirtualHost *:80> ServerAdmin jacob-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org DocumentRoot /usr/local/www/data/repositories ServerName svn.example.com ErrorLog /var/log/apache/svn-error_log CustomLog /var/log/apache/svn-access_log common <Directory /usr/local/www/data/> AllowOverride All </Directory> <Location /> DAV svn SVNParentPath /home/svn/repositories Satisfy Any AuthType Basic AuthName "Subversion repository" AuthUserFile /home/svn/svn-users AuthzSVNAccessFile /home/svn/svn-access Require valid-user </Location> </VirtualHost> -- Cheers, - Jacob Atzen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for the reply Jacob. I''m having nothing but trouble trying to setup the subdomain for some reason. Is there a way to make rails ignore the svn directory directly through the conf file? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Actually I''ve managed to setup the subdomain but now when I try to commit stuff I''m getting a PROPFIND 301 error. Here''s my conf file: LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so NameVirtualHost 75.126.60.178 <VirtualHost 75.126.60.178:80> ServerName fapbox.com [...SNIP...] </VirtualHost> <VirtualHost 75.126.60.178:80> ServerName svn.fapbox.com ServerAlias www.svn.fapbox.com DocumentRoot /usr/local/svn/repos/private ServerAdmin webmaster-TdodP3ndCaJiK979QBapAg@public.gmane.org CustomLog /usr/local/apache/domlogs/svn.fapbox.com combined CustomLog /usr/local/apache/domlogs/svn.fapbox.com-bytes_log "%{%s}t %I .\n%{%s}t %O ." <Location /> DAV svn SVNParentPath /usr/local/svn/repos/private AuthType Basic AuthName "Fapbox Subversion Repository" AuthUserFile /usr/local/svn/users/passwords Require valid-user </Location> </VirtualHost> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jim Neath wrote:> Actually I''ve managed to setup the subdomain but now when I try to > commit stuff I''m getting a PROPFIND 301 error. > > Here''s my conf file: > > LoadModule dav_svn_module modules/mod_dav_svn.so > LoadModule authz_svn_module modules/mod_authz_svn.so > > NameVirtualHost 75.126.60.178 > > <VirtualHost 75.126.60.178:80> > ServerName fapbox.com > [...SNIP...] > </VirtualHost> > > <VirtualHost 75.126.60.178:80> > ServerName svn.fapbox.com > ServerAlias www.svn.fapbox.com > DocumentRoot /usr/local/svn/repos/private > ServerAdmin webmaster-TdodP3ndCaJiK979QBapAg@public.gmane.org > CustomLog /usr/local/apache/domlogs/svn.fapbox.com combined > CustomLog /usr/local/apache/domlogs/svn.fapbox.com-bytes_log "%{%s}t > %I .\n%{%s}t %O ." > > <Location /> > DAV svn > SVNParentPath /usr/local/svn/repos/private^^ Are you sure you mean SVNParentPath here? SVNParentPath assumes that repositories are in subdirectories to this path. If you only have one repository you shouldn''t use SVNParentPath, I don''t recall the right directive, check the docs. -- Cheers, - Jacob Atzen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---