browsermedia / browsercms

BrowserCMS: Humane Content Management for Rails
http://browsercms.org
GNU Lesser General Public License v3.0
1.17k stars 260 forks source link

BrowserCMS v3.5.7 caching with NGINX - help needed #744

Open kitebuggy opened 9 years ago

kitebuggy commented 9 years ago

I'm struggling to understand how caching should be set-up, as I'm relatively new to RoR caching and to NGINX.

From BrowserCMS's deployment guide: "One way to improve the performance of BrowserCMS is to enable X-Sendfile."

So my config/production.rb file now has the following uncommented, as per the instructions:

config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx

The last paragraph simply states: "You will then need to configure your web server to handle X-Sendfile requests. See documentation for Apache and Nginx for details."

However, I can't see any documentation in either location that tells me what nginx config changes I would need to do to make this feature work. Help!?

My nginx file is based on the suggested code in the BrowserCMS deployment guide, just altered for my own domain. Any hints, code snippets, etc. gratefully accepted. Thanks in advance.