All docs I found describe how to configure dispatcher to work in a virtual root. I want to user my rails deployment under /hdchat/ path. So far every configure attempts failed. Please help me how to configure dispatch.fcgi to accept my app. Thanks, Gábor "Never trust a computer you can''t throw out a window." - Steve Wozniak _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
There used to be a how-to that explained this pretty directly, but I can''t find it now. 1) you need to add a symlink under document root to your rails application directory. Looks like you should have a sym link hdchat pointing to some rails application directory. 2) you need some rewrite rules in your web server config - I use apache, and the rewrite section looks like this: RewriteEngine On RewriteCond %{REQUEST_URI} !^/listening/public/ RewriteRule ^/listening/(.*)$ /listening/public/$1 "listening" is my rails application. This means that urls of the form domain.com/listening <http://domain.com/listening> get redirected to " domain.com/listening/public <http://domain.com/listening/public>" 3) you need to modify .htaccess in your [rails app]/public directory. You have to insert the rewrite base - here''s part of my .htaccess RewriteEngine On> RewriteBase /listeningRewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] I think that''s all there is to it. I recall that I had to deal with a few application generated urls, but that was pretty obvious. Good luck. -Kelly On 6/22/05, Gábor SEBESTYÉN <segabor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > All docs I found describe how to configure dispatcher to work in a virtual > root. I want to user my rails deployment under /hdchat/ path. So far every > configure attempts failed. Please help me how to configure dispatch.fcgito accept my app. > > Thanks, > > Gábor > > > "Never trust a computer you can''t throw out a window." - Steve Wozniak > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I wrote up a quick how-to about 2 weeks ago on this topic: http://greymatter.usc.edu/blog/articles/2005/06/10/railing-in- subdirectories Robert On Jun 22, 2005, at 9:11 AM, Gábor SEBESTYÉN wrote:> All docs I found describe how to configure dispatcher to work in a > virtual root. I want to user my rails deployment under /hdchat/ > path. So far every configure attempts failed. Please help me how to > configure dispatch.fcgi to accept my app. > > Thanks, > > Gábor > > > "Never trust a computer you can''t throw out a window." - Steve Wozniak > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
All you need to do is to symlink the applications public directory: ln -s /usr/share/typo/public typo Your web server has to allow FollowSymLinks of course. You probably also want to switch to production mode. There are two ways to do that, you can change line two of the environment.rb of the app from development to production or you could tell fastcgi to pass RAILS_EVN=production to every app running on this particular server. FastCgiConfig -initial-env RAILS_ENV=production On 6/22/05, Gábor SEBESTYÉN <segabor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> All docs I found describe how to configure dispatcher to work in a virtual > root. I want to user my rails deployment under /hdchat/ path. So far every > configure attempts failed. Please help me how to configure dispatch.fcgi to > accept my app. > > Thanks, > > Gábor > > > > > "Never trust a computer you can''t throw out a window." - Steve Wozniak > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Tobi http://www.snowdevil.ca - Snowboards that don''t suck http://typo.leetsoft.com - Open source weblog engine http://blog.leetsoft.com - Technical weblog