Closed GoogleCodeExporter closed 9 years ago
I'm sorry, it's not a matter of nested location blocks.
I think it's more to do with the order in which nginx traverses the location
blocks, i.e. if a request falls through from one nginx location block to
another, regardless of whether it is nested or not, yet not if the state
machine optimizes away the fallthrough via try_files?
This doesn't work:
server {
pagespeed on;
location / {
}
location ~* \.php$ {
pagespeed off;
if (-f $request_filename) {
fastcgi_pass unix:/tmp/php5/php5.sock;
}
fastcgi_index index.php;
include conf/fastcgi_params;
fastcgi_param HTTPS on;
}
}
Nor this:
server {
pagespeed off;
location / {
location ~* ^/(Home|images|includes|Software|Donate) {
pagespeed on;
if ($request_uri ~ \.php) {
return 403;
}
try_files $uri @aspcached;
}
}
}
Yet this does:
server {
pagespeed off;
location / {
location ~* ^/(Home|images|includes|Software|Donate) {
if ($request_uri ~ \.php) {
return 403;
}
try_files $uri @aspcached;
}
}
location @aspcached {
internal;
pagespeed on;
}
}
Original comment by mqu...@gmail.com
on 19 May 2013 at 11:41
Original comment by sligocki@google.com
on 20 May 2013 at 2:42
Let's move this to the ngx_pagespeed issue tracker:
https://github.com/pagespeed/ngx_pagespeed/issues/387
Original comment by jefftk@google.com
on 20 May 2013 at 5:03
Original issue reported on code.google.com by
mqu...@gmail.com
on 19 May 2013 at 11:30