incubator-pagespeed-ngx icon indicating copy to clipboard operation
incubator-pagespeed-ngx copied to clipboard

stats_json returns 404 unless an actual file is put in place on its path

Open oschaaf opened this issue 8 years ago • 1 comments

An issue was reported on ngx-pagespeed-discuss that describes stats_json responding with a 404, which can be resolved by putting a file named stats_json in the corresponding directory on the filesystem:

The report, including a configuration that may reproduce this was posted here:

https://groups.google.com/forum/#!msg/mod-pagespeed-discuss/9RG-f8F8yWg/x5Qpcg7OAAAJ

oschaaf avatar Aug 25 '17 12:08 oschaaf

Same for me, Nginx with proxy_pass proxies requests to backend:

$ fgrep stats_json /var/log/apache2/ -r | tail -1
/var/log/apache2/error.log:2020/09/14 19:41:00 [error] 28066#28066: *9111 open() "/etc/nginx/html/ngx_pagespeed_global_statistics/stats_json" failed (2: No such file or directory), client: 127.0.0.1, server: example.com, request: "GET /ngx_pagespeed_global_statistics/stats_json HTTP/1.1", host: "example.com"

To fix I had to:

$ mkdir -p /etc/nginx/html/ngx_pagespeed{,_global}_statistics
$ touch /etc/nginx/html/ngx_pagespeed{,_global}_statistics/stats_json

paskal avatar Sep 14 '20 16:09 paskal