Rails 3.1, Unicorn and Apache: static files

后端 未结 2 1338
礼貌的吻别
礼貌的吻别 2021-02-09 00:44

I have Rails 3.1, Unicorn and Apache setup. My Apache settings are below and production.rb looks like this. I like using h264 streaming but since Rails is serving these video fi

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-09 01:27

    Just from your production.rb code:

    # Specifies the header that your server uses for sending files
    # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
    # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
    

    Try to uncomment a line with 'X-Sendfile' header, restart your Unicorn's pool and try again.

提交回复
热议问题