Skip to content

Instantly share code, notes, and snippets.

@sfilatov
Created July 7, 2011 14:47
Show Gist options
  • Save sfilatov/1069666 to your computer and use it in GitHub Desktop.
Save sfilatov/1069666 to your computer and use it in GitHub Desktop.
Rails 3 send_file on Nginx
http {
sendfile on;
}
# Specifies the header that your server uses for sending files
config.action_dispatch.x_sendfile_header = "X-Sendfile"
# For nginx:
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
# change to
# Specifies the header that your server uses for sending files
# config.action_dispatch.x_sendfile_header = "X-Sendfile"
# For nginx:
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment