PreserveURL Param seems to not be override in Server directive

66 views
Skip to first unread message

ashly

unread,
May 24, 2018, 2:50:18 AM5/24/18
to ngx-pagespeed-discuss
Hi

I feel something strange is going on PreserveURLs params.
(PageSpeed module 1.12.34.3-stable)

I set the PreserveURL OFF in the server directive, but it seems to disabled,  pagespeed module modified HTML.

the below URL, several options can be overridden per host.

Override of the parameter is limitation? should I set the PreserveURL Param in the http directive?

Example:

Set the below one param in http directive. nginx error "FileCachePath must be set". 

pagespeed ProcessScriptVariables all;

After added the  "pagespeed off;", error is solved.

This means, pagespeed only specific values ​​can be override.

I hope that override pagespeed setting per Vhost (server directive) and common parameter is set in the http directive.

I have no idea if my understanding may be insufficient or my configuration is mistaken.


http {


 pagespeed off
;
 pagespeed
ProcessScriptVariables all;


 server
{
         listen
81;
         ignore_invalid_headers off
;
         access_log  off
;
         
         location
/ {
                 proxy_read_timeout
3600;
                 more_clear_headers
Server: ;
                 proxy_http_version
1.1;
                 proxy_set_header
Connection "";
                 resolver_timeout
300s;
                 
set $backend "$OriginIP";
                 proxy_pass  $http_backend_schema
://$backend;
                 proxy_set_header
Host                   $host;
                 proxy_redirect     off
;
                 
}
                 
 pagespeed on
;
 pagespeed
ImplicitCacheTtlMs 1;
 pagespeed
XHeaderValue "this is test";
 pagespeed
HttpCacheCompressionLevel 0;
 pagespeed
CriticalImagesBeaconEnabled false;
 pagespeed
InPlaceResourceOptimization on;
 pagespeed
PreserveUrlRelativity on;
 pagespeed
ModifyCachingHeaders off;
 pagespeed
RateLimitBackgroundFetches off;


 
##here are the code
 pagespeed
JsPreserveURLs on;
 pagespeed
ImagePreserveURLs on;
 pagespeed
CssPreserveURLs on;
 
 pagespeed
MapOriginDomain 127.0.0.1 $host;
 pagespeed
RewriteLevel PassThrough;
 pagespeed
EnableFilters add_head,rewrite_css,flatten_css_imports,fallback_rewrite_css_urls,rewrite_javascript,remove_comments,insert_dns_prefetch,in_place_optimize_for_browser;


 pagespeed
MapOriginDomain 127.0.0.1 $host;
 
}
}

ashly

unread,
May 24, 2018, 6:16:32 AM5/24/18
to ngx-pagespeed-discuss
I noticed that it related this URL

when I check the pagespeed, add the "?PageSpeedFilters=+debug"
it seems that add the ?PageSpeedFilters=+debug,  the all Filter ,option are enabled even if set the server directive.


2018年5月24日木曜日 15時50分18秒 UTC+9 ashly:
Reply all
Reply to author
Forward
0 new messages