All, I am deploying on a production system using Apache/fastcgi. I would like Apache to take care of all of my static files and dispatch.fcgi to take care of all of my Ruby templates. In order to achieve this separation, do I need to set up two vhosts in Apache, one to serve static content and one to serve dynamic content? Has anyone done this in production and can point me to the right approach? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
Wes Gamble
2006-Aug-09 21:34 UTC
[Rails] Re: Deployment: Segregating static files from RHTML
Would mod_proxy - setting up Apache as a reverse proxy - be involved? -- Posted via http://www.ruby-forum.com/.
Justin Forder
2006-Aug-12 01:00 UTC
[Rails] Deployment: Segregating static files from RHTML
Wes Gamble wrote:> All, > > I am deploying on a production system using Apache/fastcgi. > > I would like Apache to take care of all of my static files and > dispatch.fcgi to take care of all of my Ruby templates. > > In order to achieve this separation, do I need to set up two vhosts in > Apache, one to serve static content and one to serve dynamic content?No, Rails set up to run under FastCGI with Apache should do exactly what you want - Apache should serve static files from the public directory, and Rails should only be involved when there isn''t a static file for a given URL. That''s also how Rails caching works - a cached page appears as a static file in the public directory, so can be served by Apache without touching Rails. regards Justin