redmine_dmsf icon indicating copy to clipboard operation
redmine_dmsf copied to clipboard

'X-Accel-Redirect'

Open ashrafalzyoud opened this issue 6 months ago • 0 comments

Hi In production.rb When u using nginx u must uncomment these lines to serve files

config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? 

config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX

I'm trying to configuration my nginx Nginx Configuration Define the internal location: Add a location block in your Nginx configuration to handle the internal redirects. For example:

location /protected/ {
    internal;
    alias /path/to/protected/files/;
}

Set the X-Accel-Mapping header: Ensure that the X-Accel-Mapping header maps the real file path to the internal location. For example:

location / {
    proxy_set_header X-Accel-Mapping /path/to/protected/files/=/protected/;
}

But all my attachments and thumbs give 404

ashrafalzyoud avatar Aug 19 '24 20:08 ashrafalzyoud