redmine_dmsf
redmine_dmsf copied to clipboard
'X-Accel-Redirect'
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