Saturday, 10 August 2013

Exclude requests by querystring from beeing served as static files

Exclude requests by querystring from beeing served as static files

There is a mono fastcgi server running in the background and nginx in
front. I want all css / js but two special requests handled by nginx as
static files.
My nginx config looks like this
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires max;
log_not_found off;
}
location / {
root /srv/www/vhosts/abcde.de/;
fastcgi_index /;
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi_params;
}
Now /mini-profiler-includes.css?v=1.9.0.0 and
/mini-profiler-includes.js?v=1.9.0.0 should be handled by the fastcgi
server and not by nginx as static files. How would I do that?

No comments:

Post a Comment