Created
July 7, 2011 14:47
-
-
Save sfilatov/1069666 to your computer and use it in GitHub Desktop.
Rails 3 send_file on Nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
sendfile on; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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