Project

General

Profile

Actions

Defect #41190

closed

X accel redirect

Added by ashraf alzyoud 6 days ago. Updated 6 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
UI
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

  1. Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this.
    config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
  2. 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
    I uncomment these tow lines because I'm using nginx and I need serve files

But the problem it's give me in error.log
Missing mapping header
In redmine there
1-attachments
2- thumbs
3- facion

How I can configuration all these without giving error and I'm not see any examples there how nginx serve files

location /attachments {
root /var/www/redmine;
internal; #so /download is not visible to the outside world
}
location / {
proxy_set_header X-Sendfile-Type X-Accel-Redirect;
proxy_set_header X-Accel-Mapping /var/www/redmine/files/=/attachments/ #maps a real path to the internal location
...
}

Actions

Also available in: Atom PDF