X-accel-redirect and gzip_static

I’m using x-accel-redirect to serve a file from a location that has
gzip_static on; however instead of the pre-gzipped version, I am
getting me the un-gzip’d version of the file. I assume that locations
are respected for x-accel-redirects targets, what am I missing / where
should I look for more details? Config snippet follows.

This is the canonical name which redirects to the x_accel_redirect

location ~
gzip off;

fastcgi_pass webservices;
include include/fastcgi.conf;
fastcgi_intercept_errors off;


this is the direct-route to the dispatched location

location /dispatch {
root /nutricate/static;
gzip_static on;
gzip_proxied any;

this is the x_accel_redirect target where the canonical name redirects

location /x_accel_redirect {
alias /nutricate/static/;
gzip_static on;
gzip_proxied any;

I’m experiencing the same problem. Have you managed to find a

Posted at Nginx Forum:

Redirect is very necessary, you could pass the weight


Posted at Nginx Forum:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs