Differences
This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
litespeed_wiki:cloudlinux:disable-xsendfile-in-redmine [2018/06/26 08:29] Tihomir created |
litespeed_wiki:cloudlinux:disable-xsendfile-in-redmine [2018/06/27 12:42] Tihomir |
||
---|---|---|---|
Line 6: | Line 6: | ||
==== Solution ==== | ==== Solution ==== | ||
- | First you will need to edit the file: | + | Go to you redmine folder and put that in the **.htaccess** file: |
- | <code> /usr/local/lsws/fcgi-bin/RackRunner.rb </code> | + | <code> SetEnv RACK_NO_XSENDFILE 1 </code> |
- | Find this line: | ||
- | |||
- | <code> if body.respond_to?(:to_path) </code> | ||
- | |||
- | and change it to: | ||
- | |||
- | <code> | ||
- | if body.respond_to?(:to_path) and env["RACK_NO_XSENDFILE"] != "1" | ||
- | headers['X-LiteSpeed-Location'] = body.to_path | ||
- | #headers['Content-Length'] = '0' | ||
- | headers.delete('Content-Length') #Correct? | ||
- | </code> | ||
- | |||
- | That way you can control **X-Sendfile** setting via **.htaccess** file. Go to you redmine folder and put that in the **.htaccess** file: | ||
- | |||
- | <code> SetEnv RACK_NO_XSENDFILE 1 </code> | ||
==== Additionally information ==== | ==== Additionally information ==== | ||
This is an example for redmine but you can use that in any Ruby on Rails application. | This is an example for redmine but you can use that in any Ruby on Rails application. |