You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently updated my NGINX configuration to allow Rails to hand off file downloads to NGINX. Unfortunately, this breaks the CSS for delayed_job_web. My NGINX configuration is below.
With my new configuration, the CSS for delayed_job_web breaks. I know this is related to https://github.com/ejschmitt/delayed_job_web#serving-static-assets, but I can't figure out how to fix it. If I comment out the "passenger_env_var HTTP_X_ACCEL_MAPPING ..." line, then the CSS in delayed_job_web works, but NGINX no longer takes control of sending files.
Is there a way to adjust the HTTP_X_ACCEL_MAPPING header so that I can use delayed_job_web and offload sending files to NGINX?
server {
listen 7000;
server_name localhost;
root /www/pricer_pro/public; # <--- be sure to point to 'public'!
passenger_enabled on;
rack_env development;
# Allow NGINX to serve any file in /www/pricer_pro/__send_file
# via a special internal-only location.
location /__send_file_accel {
internal;
alias /www/pricer_pro/__send_file;
}
passenger_set_header X-Sendfile-Type "X-Accel-Redirect";
passenger_env_var HTTP_X_ACCEL_MAPPING /www/pricer_pro/__send_file/=/__send_file_accel/;
passenger_pass_header X-Accel-Redirect;
}
The text was updated successfully, but these errors were encountered:
I recently updated my NGINX configuration to allow Rails to hand off file downloads to NGINX. Unfortunately, this breaks the CSS for delayed_job_web. My NGINX configuration is below.
With my new configuration, the CSS for delayed_job_web breaks. I know this is related to https://github.com/ejschmitt/delayed_job_web#serving-static-assets, but I can't figure out how to fix it. If I comment out the "passenger_env_var HTTP_X_ACCEL_MAPPING ..." line, then the CSS in delayed_job_web works, but NGINX no longer takes control of sending files.
Is there a way to adjust the HTTP_X_ACCEL_MAPPING header so that I can use delayed_job_web and offload sending files to NGINX?
The text was updated successfully, but these errors were encountered: