Welcome! Log In Create A New Profile

Advanced

x-accel-redirect and gzip_static

Andrew Hammond
December 19, 2011 07:04PM
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
    location ~ /dispatch/.*/(ric_sw_version|config.xml|employee.xml|config_data.xml))
    {
        gzip off;

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

# this is the direct-route to the dispatched location
    location /dispatch {
        root /nutricate/static;
        gzip_static on;
        gzip_proxied any;
        break;
    }

# this is the x_accel_redirect target where the canonical name redirects to.
    location /x_accel_redirect {
        internal;
        alias /nutricate/static/;
        gzip_static on;
        gzip_proxied any;
    }
}

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

x-accel-redirect and gzip_static

Andrew Hammond December 19, 2011 07:04PM

Re: x-accel-redirect and gzip_static

wouterdebie August 15, 2012 06:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 122
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready