ngx_pagespped cuts off all meaningful cache headers

34 views
Skip to first unread message

Gendos_ua

unread,
Feb 25, 2018, 12:28:04 PM2/25/18
to ngx-pagespeed-discuss
I've installed module to optimize CSS, JS and whitespace. So far config is the following (module v1.13.35.2-0):

pagespeed on;
pagespeed
RewriteLevel PassThrough;
pagespeed
FileCachePath "/var/cache/ngx_pagespeed/";
pagespeed
EnableFilters combine_css,collapse_whitespace;

pagespeed
StaticAssetPrefix /speed/;
pagespeed
EnableCachePurge on;
pagespeed
FetchHttps disable;
pagespeed
ModifyCachingHeaders off;
pagespeed
ModPagespeedRewriteDeadlinePerFlushMs 500;
pagespeed
Allow "*";
pagespeed
MaxCombinedCssBytes -1;
pagespeed
CssPreserveURLs off;

The issue is - when module is enabled it cuts off headers for images and CSS.

For example, headers for png image with pagespeed off:
accept-ranges:bytes
cache
-control:max-age=2592000
content
-length:33992
content
-type:image/png
date
:Sun, 25 Feb 2018 16:57:43 GMT
etag
:"5a92c404-84c8"
expires
:Tue, 27 Mar 2018 16:57:43 GMT
last-modified:Sun, 25 Feb 2018 14:11:16 GMT
server
:nginx/1.10.2
status
:200
strict
-transport-security:max-age=15768000

And with pagespeed on:

content-type:image/png
date
:Sun, 25 Feb 2018 17:20:43 GMT
server
:nginx/1.10.2
status
:200

Debug output:
<!--
mod_pagespeed on
Filters:
cw  Collapse Whitespace
cc  Combine Css
db  Debug
hw  Flushes html


Options:
AvoidRenamingIntrospectiveJavascript (aris) True
CombineAcrossPaths (cp) True
CssPreserveURLs (cpu) False
EnableCachePurge (euci) True
EnableRewriting (e) 1
FileCacheInodeLimit (afcl) 500000
ImageInlineMaxBytes (ii) 3072
ImageMaxRewritesAtOnce (im) -1
JsPreserveURLs (jpu) False
MaxCombinedCssBytes (xcc) -1
ModifyCachingHeaders (mch) False
PreserveUrlRelativity (pur) False
RewriteDeadlinePerFlushMs (rdm) 500
RewriteLevel (l) Pass Through
Statistics (ase) True
StatisticsLogging (asle) True
XHeaderValue (xhv) Powered By ngx_pagespeed


#NumFlushes            1
#EndDocument after     8261us
#Total Parse duration  4177us
#Total Render duration 2059us
#Total Idle duration   2605us
The following filters were disabled for this request:
    SupportNoscript
-->

As you can see there's no image related filters enabled, so why is this happening?

Longinos

unread,
Feb 27, 2018, 4:39:17 AM2/27/18
to ngx-pagespeed-discuss
Hi
As a test.. have you tried to use
pagespeed Disallow *.png ?

Gendos_ua

unread,
Feb 27, 2018, 5:54:54 AM2/27/18
to ngx-pagespeed-discuss
Hi Longinos, thank you for reply.

I tried and it worked! Shame on me, I should have known, it's so simple :)

Thank you again!

вторник, 27 февраля 2018 г., 11:39:17 UTC+2 пользователь Longinos написал:
Reply all
Reply to author
Forward
0 new messages