Last night at our little hack session at John’s, I added the ability to
support X-Accel-Redirect headers for nginx. It would be great if
someone could test this addition with nginx. In config/environment.rb,
put this line inside the config.after_initialize block:
Since I have seancribbs.com running the latest and hosted using
Apache/Passenger, I decided to turn on X-Sendfile headers. However,
Apache doesn’t seem to recognize them and just serves up a blank
response (with the X-Sendfile header included in the response). So my
questions are two:
Is this just a side-effect of using Passenger? Would a proxy scenario
(Mongrel, Thin, etc) work?
Is there something different Radiant should be doing with other
headers to make it work?
Additionally, if anyone could look into conditional GETs and make sure
we’re doing it right, that would be great.
Once a page has comments there is a link in the admin of that page to
view comments and if I click on it I get an application error. This
is what the production log says:
Comments may not have been updated for Radiant 0.7 (which did not
preserve named routes from earlier versions)
I believe it should be edit_admin_page_url now, assuming you are on
edge Radiant.
And did it work in production? When I did exactly that (probably 4
months ago), I found sometimes I would get a blank page or the plain
text version of the cache file. I didn’t have time to figure it out,
so I just turned it off again.
They wouldn’t report a different size (all other headers are preserved),
but the header gives the file a fast-track through the web-server and
operating system. Essentially, it tells the OS to stream the file to
the socket, on OS’s that support it.
i’ve been using the old x-sendfile patch on nginx and mongrel for about
a
year with no blank page issues. after setting up an edge 0.7 in a
virtual
machine i was able to run nginx and thin in production mode with no
blank
pages in well over a million requests through ab (assuming those blank
pages
would report their size differently than the page that was supposed to
be
served).