I have done my homework -- I swear -- but I just can''t seem to get my rails application to run in a subdirectory off my main document root. I am using Dreamhost (fwiw) which runs f-cgi, apache 1.3, and rails .13.1. I''ve been trying to follow some instructions like these two -- http://wiki.dreamhost.com/index.php/Ruby_on_Rails (which recommends using a subdomain which i don''t want to do) http://wiki.rubyonrails.com/rails/show/HowtoUseSymLinksToGraftRailsOntoYourWebsite My rails application (FTP''d from my mac) "nvt" is located at ~/nvt/ The public directory (~/nvt/public) is symlinked into my Document Root at: ~/www.mydomain.com/nvt (symlink) My ~/nvt/public/.htaccess says: RewriteEngine On RewriteBase /nvt/public # was told this is necessary for subdirectories RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] Rails responds immediately with "Rails application failed to start properly" and my apache error log reports: mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use ''RewriteOptions MaxRedirects'' to increase the limit if neccessary. Any help tracking down how to get this working would be much appreciated. Thanks. Noah
I gave that a try (thanks) - but unfortunately I still am getting "maximum number of rewrites exceeded". (I think that Dreamhost Panel "remap" sets up an mod_alias, from what I can gather) I see that there was a rails ticket about this - maximum num rewrites: http://dev.rubyonrails.com/ticket/1752 But I seem only to be getting the problem if I DO have a RewriteBase, whereas the ticket claims that having a RewriteBase alleviates the rewrite problem. Hmm. So I''m still troubled. Rails-wise that is. On 9/19/05, Timothy Fisher <trfishermi-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> Instead of using SymLinks, you can set up directory mappings through the > Dreamhost Control Panel. > I used that method to achieve this on Dreamhost. > > Tim > > > Noah Davis <noah.box-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > I have done my homework -- I swear -- but I just can''t seem to get my > rails application to run in a subdirectory off my main document root. > I am using Dreamhost (fwiw) which runs f-cgi, apache 1.3, and rails > .13.1. > > I''ve been trying to follow some instructions like these two -- > http://wiki.dreamhost.com/index.php/Ruby_on_Rails (which > recommends > using a subdomain which i don''t want to do) > http://wiki.rubyonrails.com/rails/show/HowtoUseSymLinksToGraftRailsOntoYourWebsite > > My rails application (FTP''d from my mac) "nvt" is located at > > ~/nvt/ > > The public directory (~/nvt/public) is symlinked into my Document Root at: > > ~/www.mydomain.com/nvt (symlink) > > My ~/nvt/public/.htaccess says: > > RewriteEngine On > RewriteBase /nvt/public # was told this is necessary for subdirectories > RewriteRule ^$ index.html [QSA] > RewriteRule ^([^.]+)$ $1.html [QSA] > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] > > Rails responds immediately with "Rails application failed to start > properly" and my apache error log reports: > > mod_rewrite: maximum number of internal redirects reached. Assuming > configuration error. Use ''RewriteOptions MaxRedirects'' to increase the > limit if neccessary. > > Any help tracking down how to get this working would be much > appreciated. Thanks. > > Noah > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > ________________________________ > Yahoo! for Good > Click here to donate to the Hurricane Katrina relief effort. > >
I''m kinda busy at the moment, but when I get home this evening, I''ll take a closer look at my configuration and email you any relevant details I come across. I had some trouble initially getting this to work also, but I do have it working, on Dreamhost. Do you have Yahoo Messenger? If you do, you can ping me on there later too... trfishermi is my messenger ID. Tim Noah Davis <noah.box-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: I gave that a try (thanks) - but unfortunately I still am getting "maximum number of rewrites exceeded". (I think that Dreamhost Panel "remap" sets up an mod_alias, from what I can gather) I see that there was a rails ticket about this - maximum num rewrites: http://dev.rubyonrails.com/ticket/1752 But I seem only to be getting the problem if I DO have a RewriteBase, whereas the ticket claims that having a RewriteBase alleviates the rewrite problem. Hmm. So I''m still troubled. Rails-wise that is. On 9/19/05, Timothy Fisher wrote:> Instead of using SymLinks, you can set up directory mappings through the > Dreamhost Control Panel. > I used that method to achieve this on Dreamhost. > > Tim > > > Noah Davis wrote: > I have done my homework -- I swear -- but I just can''t seem to get my > rails application to run in a subdirectory off my main document root. > I am using Dreamhost (fwiw) which runs f-cgi, apache 1.3, and rails > .13.1. > > I''ve been trying to follow some instructions like these two -- > http://wiki.dreamhost.com/index.php/Ruby_on_Rails (which > recommends > using a subdomain which i don''t want to do) > http://wiki.rubyonrails.com/rails/show/HowtoUseSymLinksToGraftRailsOntoYourWebsite > > My rails application (FTP''d from my mac) "nvt" is located at > > ~/nvt/ > > The public directory (~/nvt/public) is symlinked into my Document Root at: > > ~/www.mydomain.com/nvt (symlink) > > My ~/nvt/public/.htaccess says: > > RewriteEngine On > RewriteBase /nvt/public # was told this is necessary for subdirectories > RewriteRule ^$ index.html [QSA] > RewriteRule ^([^.]+)$ $1.html [QSA] > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] > > Rails responds immediately with "Rails application failed to start > properly" and my apache error log reports: > > mod_rewrite: maximum number of internal redirects reached. Assuming > configuration error. Use ''RewriteOptions MaxRedirects'' to increase the > limit if neccessary. > > Any help tracking down how to get this working would be much > appreciated. Thanks. > > Noah > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > ________________________________ > Yahoo! for Good > Click here to donate to the Hurricane Katrina relief effort. > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I''ve since made some progress by simplifying it a bit and setting up a brand new rails application. I discovered a few things. 1. My RewriteBase was off. /nvt/ works, but /nvt/public/ (which I think was the suggestion) does not. After changing it, #2 happened: 2. I got a MySQL error - why? it was running in development mode (still is) and pointing to a non-existent database. I was under the impression that dreamhost set things up to run in "production" mode by default. Maybe it does and I''m overriding the environment setting somewhere. I temporarily pointed all db settings to the same place. 3. when i finally had a working CGI app running, I tried to flip the switch to fastcgi. well, that didn''t work. I get the following errors in my apache logs: FastCGI: comm with (dynamic) server "{pathtohome}nvt/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) FastCGI: incomplete headers (0 bytes) received from server "{pathtohome}nvt/public/dispatch.fcgi" So ... getting there, just not in production mode and not with fastcgi ... Noah On 9/19/05, Timothy Fisher <trfishermi-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> I''m kinda busy at the moment, but when I get home this evening, I''ll take a > closer look at my configuration and email you any relevant details I come > across. > I had some trouble initially getting this to work also, but I do have it > working, on Dreamhost. > > Do you have Yahoo Messenger? If you do, you can ping me on there later > too... trfishermi is my messenger ID. > > Tim > > Noah Davis <noah.box-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > I gave that a try (thanks) - but unfortunately I still am getting > "maximum number of rewrites exceeded". (I think that Dreamhost Panel > "remap" sets up an mod_alias, from what I can gather) > > I see that there was a rails ticket about this - maximum num rewrites: > > http://dev.rubyonrails.com/ticket/1752 > > But I seem only to be getting the problem if I DO have a RewriteBase, > whereas the ticket claims that having a RewriteBase alleviates the > rewrite problem. > > Hmm. So I''m still troubled. Rails-wise that is. > > On 9/19/05, Timothy Fisher wrote: > > Instead of using SymLinks, you can set up directory mappings through the > > Dreamhost Control Panel. > > I used that method to achieve this on Dreamhost. > > > > Tim > > > > > > Noah Davis wrote: > > I have done my homework -- I swear -- but I just can''t seem to get my > > rails application to run in a subdirectory off my main document root. > > I am using Dreamhost (fwiw) which runs f-cgi, apache 1.3, and rails > > .13.1. > > > > I''ve been trying to follow some instructions like these two -- > > http://wiki.dreamhost.com/index.php/Ruby_on_Rails (which > > recommends > > using a subdomain which i don''t want to do) > > > http://wiki.rubyonrails.com/rails/show/HowtoUseSymLinksToGraftRailsOntoYourWebsite > > > > My rails application (FTP''d from my mac) "nvt" is located at > > > > ~/nvt/ > > > > The public directory (~/nvt/public) is symlinked into my Document Root at: > > > > ~/www.mydomain.com/nvt (symlink) > > > > My ~/nvt/public/.htaccess says: > > > > RewriteEngine On > > RewriteBase /nvt/public # was told this is necessary for subdirectories > > RewriteRule ^$ index.html [QSA] > > RewriteRule ^([^.]+)$ $1.html [QSA] > > RewriteCond %{REQUEST_FILENAME} !-f > > RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] > > > > Rails responds immediately with "Rails application failed to start > > properly" and my apache error log reports: > > > > mod_rewrite: maximum number of internal redirects reached. Assuming > > configuration error. Use ''RewriteOptions MaxRedirects'' to increase the > > limit if neccessary. > > > > Any help tracking down how to get this working would be much > > appreciated. Thanks. > > > > Noah > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > ________________________________ > > Yahoo! for Good > > Click here to donate to the Hurricane Katrina relief effort. > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > ________________________________ > Yahoo! for Good > Click here to donate to the Hurricane Katrina relief effort. > >