Hi,
I’d like to spread to other rubyOnRails developers this simple
configuration I found userful for setting up ruby.
A easy way to set up ruby is to proxying the request versus WEBrick.
This is not the preferred way for a true production site but it works
fine.
To to so, I have changed the “config/routes.rb” to prepend the /
rails/ path to every url:
#[GG] Changed to support proxing
map.connect ‘rails/:controller/:action/:id’
Then I set up on apache a proxy rule like this:
ProxyPass /rails/ http://yoda.local:3000/rails/ ProxyRequests OffIt works fine and result also in a centralized way of distributing
the load.
For instance, I have to machine on my site:
- a true old web server (very slow, it can serve only static pages
and so on) - a brand new mac mini, powered by ruby on rails
So the slow machine forward the request to the mac mini, and I get a
very FAST way of setting up a development
env. on the internet!
For more magic tips see
http://manuals.rubyonrails.com/read/chapter/65
–
[ [ [ JJ ] ] ] | Temi cio’ che conosci, non
| cio’ che non conosci
http://www.siforge.org |