server {
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
pagespeed Domain https://testsalon.co.uk; pagespeed LoadFromFile https://testsalon.co.uk /var/html/www/static; pagespeed LoadFromFileRuleMatch disallow "\.php$ps_dollar";
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
LoadFromFile is enclosed between "".
LoadFromFile have quotes and
LoadFromFileRuleMatch don´t.
Are the files rewrited by pagespeed?
If not, try https://www.mydomain.com/?PageSpeedFilters=+debug and look at the html code for debug messages.
Are the resources served by apache and proxied by nginx?
In my case I have only ngix, not proxy stuff.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Can you give me an idea how to do that? Not sure how to debug system calls in that way.
130 oschaaf@nps-gzip-issue-1556:~/incubator-pagespeed-ngx/testing-dependencies/mod_pagespeed/net/instaweb/rewriter⟫ sudo strace -p 6935 -y 2>&1 | grep css recvfrom(13<socket:[5326977]>, "GET /A.store.css+vendor.css,Mcc."..., 1024, 0, NULL, NULL) = 165 open("/var/ngx_pagespeed_cache/v3/localhost/http,3A/,2Flocalhost/A.store.css+vendor.css,2CMcc.00EaqUIgkT.css.pagespeed.cf.tuzrpz_-Py.css,", O_RDONLY) = -1 ENOENT (No such file or directory) recvfrom(13<socket:[5326985]>, "GET /A.store.css+vendor.css,Mcc."..., 1024, 0, NULL, NULL) = 165 open("/var/ngx_pagespeed_cache/v3/localhost/http,3A/,2Flocalhost/A.store.css+vendor.css,2CMcc.00EaqUIgkT.css.pagespeed.cf.tuzrpz_-Py.css,", O_RDONLY) = -1 ENOENT (No such file or directory)
In your case I would grep for the path covered by LoadFromFile
Thanks for your replies.
Can you give me an idea how to do that? Not sure how to debug system calls in that way.
sudo strace $(pidof nginx |sed 's/\([0-9]*\)/\-p \1/g') -y 2>&1 | grep /var/html/www/static
sudo strace $(pidof nginx |sed 's/\([0-9]*\)/\-p \1/g') -y 2>&1 | grep /var/html/
ubuntu@ip-172-31-36-110:~$ sudo strace $(pidof nginx |sed 's/\([0-9]*\)/\-p \1/g') -y 2>&1 | grep /html/[pid 30241] open("/var/html/conf/pagespeed/cache/cache.purge", O_RDONLY) = 14</var/html/conf/pagespeed/cache/cache.purge>[pid 30241] fstat(14</var/html/conf/pagespeed/cache/cache.purge>, {st_mode=S_IFREG|0600, st_size=14, ...}) = 0[pid 30241] fstat(14</var/html/conf/pagespeed/cache/cache.purge>, {st_mode=S_IFREG|0600, st_size=14, ...}) = 0[pid 30241] read(14</var/html/conf/pagespeed/cache/cache.purge>, "1527011654457\n", 4096) = 14[pid 30241] close(14</var/html/conf/pagespeed/cache/cache.purge>) = 0[pid 30241] write(4</var/html/conf/nginx/logs/access.log>, "{ \"time_local\": \"24/May/2018:10:"..., 385) = 385[pid 30241] write(4</var/html/conf/nginx/logs/access.log>, "{ \"time_local\": \"24/May/2018:10:"..., 416) = 416[pid 30238] open("/var/html/conf/pagespeed/cache/cache.purge", O_RDONLY) = 22</var/html/conf/pagespeed/cache/cache.purge>[pid 30238] fstat(22</var/html/conf/pagespeed/cache/cache.purge>, {st_mode=S_IFREG|0600, st_size=14, ...}) = 0[pid 30238] fstat(22</var/html/conf/pagespeed/cache/cache.purge>, {st_mode=S_IFREG|0600, st_size=14, ...}) = 0[pid 30238] read(22</var/html/conf/pagespeed/cache/cache.purge>, "1527011654457\n", 4096) = 14[pid 30238] close(22</var/html/conf/pagespeed/cache/cache.purge>) = 0[pid 30238] write(4</var/html/conf/nginx/logs/access.log>, "{ \"time_local\": \"24/May/2018:10:"..., 339) = 339
.......................
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
http {
pagespeed FileCachePath "/var/html/conf/pagespeed/cache/";
server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name testsalon.co.uk; ssl on;
ssl_certificate /var/html/conf/letsencrypt/config/live/testsalon.co.uk/fullchain.pem; ssl_certificate_key /var/html/conf/letsencrypt/config/live/testsalon.co.uk/privkey.pem;
pagespeed on;
pagespeed LoadFromFile "https://testsalon.com/files/" "/var/www/files/"; pagespeed EnableFilters debug; pagespeed RewriteLevel PassThrough; proxy_pass_header Set-Cookie; proxy_set_header Host $http_host:80; location /ngx_pagespeed_statistics { } location /ngx_pagespeed_global_statistics { } location /ngx_pagespeed_message { } location /pagespeed_console { } location ~ ^/pagespeed_admin { } location ~ ^/pagespeed_global_admin { } location ~* "^/ngx_pagespeed_beacon$" { } location ~* "^/pagespeed_static/" { }
location / { proxy_pass http://localhost:8080; }
}
}
Filters: | |
db Debug | |
hw Flushes html | |
Options: | |
AvoidRenamingIntrospectiveJavascript (aris) True | |
EnableCachePurge (euci) True | |
EnableRewriting (e) 1 | |
FileCacheInodeLimit (afcl) 500000 | |
RewriteLevel (l) Pass Through |
https://testsalon.com/files/ url´s are used, no no files from disk are used.
As a test, use
pagespeed RewriteLevel Corefilters;
and
pagespeed LoadFromFile "https://testsalon.co.uk/" "/var/www/";
pagespeed LoadFromFileRuleMatch disallow .*;
pagespeed LoadFromFileRuleMatch allow \.(js|css|jpg|jpeg|png|pdf|gif)(\?.*)?$;
I asume that your root dir is /var/www/
pagespeed FileCachePath "/var/html/conf/pagespeed/cache/"; server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name testsalon.co.uk; ssl on; ssl_certificate /var/html/conf/letsencrypt/config/live/testsalon.co.uk/fullchain.pem; ssl_certificate_key /var/html/conf/letsencrypt/config/live/testsalon.co.uk/privkey.pem;
pagespeed on;
pagespeed LoadFromFile "https://testsalon.co.uk/files/" "/var/html/wwwroot/salonguru/wp-content/blogs.dir/138/files/"; pagespeed LoadFromFile "https://testsalon.co.uk/wp-content/" "/var/html/wwwroot/salonguru/wp-content/";
pagespeed LoadFromFileRuleMatch disallow .*; pagespeed LoadFromFileRuleMatch allow \.(js|css|jpg|jpeg|png|pdf|gif)(\?.*)?$;
proxy_pass_header Set-Cookie; proxy_set_header Host $http_host:80; location /ngx_pagespeed_statistics { } location /ngx_pagespeed_global_statistics { } location /ngx_pagespeed_message { } location /pagespeed_console { } location ~ ^/pagespeed_admin { } location ~ ^/pagespeed_global_admin { } location ~* "^/ngx_pagespeed_beacon$" { } location ~* "^/pagespeed_static/" { }
location / { proxy_pass http://localhost:8080; }
}
Metadata cache key:rname/aj_lrMnZr0pTnLVQ25f6WQk/https://testsalon.co.uk/files/TEST-SALON-1.jpg@@_
cache_ok:true
can_revalidate:false
partitions:partition {
optimizable: false
input {
index: 0
type: FILE_BASED
last_modified_time_ms: 1519053230000
filename: "/var/html/wwwroot/salonguru/wp-content/blogs.dir/138/files/TEST-SALON-1.jpg"
}
}
other_dependency {
type: FILE_BASED
last_modified_time_ms: 1519053230000
filename: "/var/html/wwwroot/salonguru/wp-content/blogs.dir/138/files/TEST-SALON-1.jpg"
}
debug_message: "Image https://testsalon.co.uk/files/TEST-SALON-1.jpg does not appear to need resizing."
cache_ok:false
can_revalidate:false
partitions:
Shared memory metadata cache 'pagespeed_default_shm' statistics:
Total put operations: 7612505
updating an existing key: 512
replace/conflict miss: 238
simultaneous same-key insert: 0
dropped since all of associativity set locked: 0
spinning sleeps performed by writers: 0
Total get operations: 36626
hits: 9518 (25.99%)
Entries used: 7590310 (26.01%)
Blocks used: 58348417 (99.99%)
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
https://github.com/apache/incubator-pagespeed-mod/blob/master/install/debug.conf.template#L464
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
####### GENERAL NGINX CONFIGURATION #########
events { worker_connections 1024; multi_accept on; use epoll;}
http { # General Settings sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; server_tokens off; reset_timedout_connection on; server_names_hash_bucket_size 1024; server_name_in_redirect on; # Logging. Log formats can only be set for access logs. log_format sgjson escape=json '{ "time_local": "$time_local", ' '"remote_addr": "$remote_addr", ' '"remote_user": "$remote_user", ' '"domain": "$host", ' '"request": "$request", ' '"status": "$status", ' '"body_bytes_sent": "$body_bytes_sent", ' '"request_time": "$request_time", ' '"http_referrer": "$http_referer", ' '"http_user_agent": "$http_user_agent" }';
access_log ***/access.log sgjson; error_log ***/error.log; # Timeouts & General - OLD 3000 ?? / SECONDS client_max_body_size 20m; proxy_connect_timeout 120; proxy_send_timeout 120; proxy_read_timeout 120; send_timeout 120; client_header_timeout 120; client_body_timeout 120;
include /etc/nginx/mime.types; default_type text/html;
# SSL Settings ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on;
#Define backend upstream backend { #ip_hash; server 127.0.0.1:8080; } map $http_x_forwarded_proto $thescheme { default $scheme; https https; } #STATIC EXPIRES MAPPING map $sent_http_content_type $expires { default off; text/html eposh; text/css max; application/javascript max; ~image/ max; image/png max; image/jpg max; } #GENERAL #pagespeed ProcessScriptVariables off; pagespeed ImageMaxRewritesAtOnce 150; # pagespeed RateLimitBackgroundFetches off; pagespeed InPlaceResourceOptimization on; pagespeed XHeaderValue "Powered by Salon Guru LTD"; # pagespeed FetchHttps enable; //not required pagespeed FetchWithGzip on; pagespeed LogDir /***pagespeed/logs/; #MAP EXTERNAL RESOURCES # pagespeed DangerPermitFetchFromUnknownHosts on; pagespeed MapProxyDomain https://***.salonguru.net/latedeals https://latedeals.***.co/;
.........
.........
......... (there are many of these that ive removed .......... #CACHING pagespeed EnableCachePurge on; proxy_cache_path /var/html/conf/nginx/cache levels=1:2 keys_zone=SGProduction:1000m inactive=168h max_size=20g; #pagespeed MemcachedServers "salonguru.npsft3.cfg.euw1.cache.amazonaws.com:11211"; pagespeed FileCachePath "/var/html/conf/pagespeed/cache/"; #pagespeed DefaultSharedMemoryCacheKB 7340032; #7gb pagespeed DefaultSharedMemoryCacheKB 5242880; #5gb #pagespeed DefaultSharedMemoryCacheKB 2621440; #2.5gb #pagespeed FileCacheSizeKb 31457280; #30gb pagespeed FileCacheSizeKb 26214400; #25gb #pagespeed FileCacheSizeKb 20971520; #20gb #pagespeed FileCacheSizeKb 15728640; #15gb pagespeed ShmMetadataCacheCheckpointIntervalSec 300; pagespeed ForceCaching on; #pagespeed ImplicitCacheTtlMs 604800000; # 1 week #LOAD FROM FILE CONFIGURATION pagespeed LoadFromFileRuleMatch disallow .*; pagespeed LoadFromFileRuleMatch allow \.(js|css|jpg|jpeg|png|pdf|gif)(\?.*)?\$; #LOGGING pagespeed StatisticsLogging on; pagespeed StatisticsLoggingIntervalMs 60000; pagespeed StatisticsLoggingMaxFileSizeKb 102400; pagespeed MessageBufferSize 2048000; #HANDLERS pagespeed StatisticsPath /ngx_pagespeed_statistics; pagespeed GlobalStatisticsPath /ngx_pagespeed_global_statistics; pagespeed MessagesPath /ngx_pagespeed_message; pagespeed ConsolePath /pagespeed_console; pagespeed AdminPath /pagespeed_admin; pagespeed GlobalAdminPath /pagespeed_global_admin; pagespeed StatisticsDomains Allow ***.salonguru.net; pagespeed GlobalStatisticsDomains Allow ***.salonguru.net; pagespeed MessagesDomains Allow ***.salonguru.net; pagespeed ConsoleDomains Allow ***.salonguru.net; pagespeed AdminDomains Allow ***.salonguru.net; pagespeed GlobalAdminDomains Allow ***.salonguru.net; #FILTERS pagespeed EnableFilters extend_cache; pagespeed EnableFilters prioritize_critical_css,fallback_rewrite_css_urls,combine_css; pagespeed PermitIdsForCssCombining style*; pagespeed EnableFilters rewrite_javascript,defer_javascript; pagespeed EnableFilters collapse_whitespace; pagespeed EnableFilters inline_google_font_css; # pagespeed EnableFilters make_google_analytics_async;
#lazyload_images - causes issue? pagespeed EnableFilters rewrite_images,responsive_images,jpeg_subsampling,inline_images,convert_jpeg_to_progressive; pagespeed NoTransformOptimizedImages on; #SYSTEM SERVER BLOCKS server { listen 80 default_server; listen [::]:80 default_server; return 301 https://$host$request_uri; } server { listen 443 default_server; listen [::]:443 default_server; ssl on; ssl_certificate ***/fullchain.pem; ssl_certificate_key ***/privkey.pem; #Default Location - catch if site doesn't exist error_page 404 403 /index.php; location / { allow all; pagespeed standby; root ***/public/; } #Let's Encrypt location ~ /.well-known { allow all; pagespeed standby; root /***/salonguru/; } }
#Include SG configs #include ***/conf.d/*.conf; include ***/sites-enabled/*;}
} server { listen 443 ssl http2; listen [::]:443 ssl http2;
server_name www.testsalon.co.uk; ssl on; ssl_certificate /***/live/testsalon.co.uk/fullchain.pem; ssl_certificate_key /***/live/testsalon.co.uk/privkey.pem; return 301 https://testsalon.co.uk$request_uri;
ssl_certificate /***/live/testsalon.co.uk/fullchain.pem; ssl_certificate_key /***/live/testsalon.co.uk/privkey.pem;
include /var/html/conf/nginx/config/common.ca.conf; }
# pagespeed handlers & general options
pagespeed on;set $wordpress_auth "";
location /ngx_pagespeed_statistics { }location /ngx_pagespeed_global_statistics { }location /ngx_pagespeed_message { }location /pagespeed_console { }location ~ ^/pagespeed_admin { }location ~ ^/pagespeed_global_admin { }location ~* "^/ngx_pagespeed_beacon$" { }location ~* "^/pagespeed_static/" { }
# Set proxy headers for the passthroughport_in_redirect off;
proxy_pass_header Set-Cookie;proxy_set_header Host $http_host:80;
proxy_set_header X-Forwarded-Host $http_host;proxy_set_header X-Forwarded-Proto $scheme;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#### SECURITY #####prevents TRACE, DELETE, PUT, OPTIONS.if ($request_method !~ ^(GET|HEAD|POST)$ ){ return 405;}location ~ /(XAttacker.php|attacker|xattacker|xAttacker|Xattacker|X=Attacker) { deny all;} #X-XSS PROTECTION - To mitigate Cross-Site scripting attackadd_header X-XSS-Protection "1; mode=block";
# PREVENT CLICKJACKINGadd_header X-Frame-Options "SAMEORIGIN";
##################
# DISABLE PAGESPEED / CACHES FOR THESE LOCATIONSlocation ~* ^/(wp-admin|wp-login|salon-gift-vouchers|shopping-cart|gift-vouchers|YourSalon-Deals|cart|checkout|my-account|online-store|basket|shop|store|product|amp|status) { proxy_pass http://backend; pagespeed standby;}
# DISABLE PAGESPEED FOR YOURSALON.CO FED CONTENTlocation ~* ^/(yoursalon|content-only) { proxy_pass http://backend; pagespeed standby;}
# BYPASS FOR YOURSALON QUERIESif ($arg_ysr != "") { set $bypass_cache "1";}
# DISABLE CACHES FOR ZIG ZAG MESSAGESlocation ~* ^/(message) { proxy_pass http://backend; pagespeed standby;}
# DISABLE CACHES & PAGESPEED FOR SENDY PLUGIN FILESlocation ~* ^/(wp-content/uploads/browsershot) { proxy_pass http://backend; pagespeed standby;}
# DISABLE CACHES & PAGESPEED FOR SALON GURU GDPR PAGESlocation ~* ^/(dpa|wdma) { proxy_pass http://backend; pagespeed standby;}
# REDIRECT BLOG SIGNUP PAGElocation ~* ^/(wp-signup) { rewrite ^/.* https://www.salonguru.net permanent;}
# DETECT DEVICE# Source: http://detectmobilebrowsers.com/set $mobile_detect desktop;if ($http_user_agent ~* "(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino") { set $mobile_detect mobile;}if ($http_user_agent ~* "^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-)") { set $mobile_detect mobile;}
# SET CACHE KEY BASED ON DEVICEset $cache_key $mobile_detect|$host|$request_uri|$request_body;
#BYPASS CACHE FOR OPTIMISED RESOURCESif ($uri ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+") { set $bypass_cache "1";}
if ($uri ~* "\.(jpg|jpeg|png|gif|ico|css|js|webp)") { set $bypass_cache "1";}
location / { #Caches proxy_cache SGProduction; proxy_cache_key $cache_key; proxy_cache_valid 10m; proxy_ignore_headers Cache-Control Set-Cookie Expires; proxy_cache_revalidate on; proxy_cache_background_update on; proxy_cache_lock on; proxy_http_version 1.1; proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; # CATCH WORDPRESS COOKIES if ($http_cookie ~* "wordpress_logged_in_[^=]*=([^%]+)%7C") { set $wordpress_auth "1"; pagespeed standby; } # REMOVE CACHE IF ON PASSWORD PROTECTED PAGE if ($http_cookie ~* "wp-postpass_") { set $wordpress_auth "1"; } # Set headers add_header X-Cache-Status $upstream_cache_status; add_header X-Cache-Key $cache_key; add_header X-Cache-Device $mobile_detect;
# Bypass for when logged into Wordpress proxy_cache_bypass $wordpress_auth; # Do not serve response from cache. proxy_no_cache $wordpress_auth; # Do save the response to cache #Bypass for optimise resources proxy_cache_bypass $bypass_cache; proxy_no_cache $bypass_cache; # Bypass for dev tools / hard refreshes proxy_cache_bypass $http_pragma; # Proxy request to backend proxy_pass http://backend;}
pagespeed LoadFromFile "https://www.testsalon.co.uk/files/" "/var/html/wwwroot/salonguru/wp-content/blogs.dir/138/files/";pagespeed LoadFromFile "https://www.testsalon.co.uk/wp-content/" "/var/html/wwwroot/salonguru/wp-content/";
pagespeed LoadFromFile "https://www.salonguru.net/files/" "/var/html/wwwroot/salonguru/wp-content/blogs.dir/150/files/";pagespeed LoadFromFile "https://www.salonguru.net/wp-content/" "/var/html/wwwroot/salonguru/wp-content/";
........
........
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
Any joy on this yet?Shane :)
--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Sorry for the late reply. It looks like it is also not straightforward to point out what couldprevent LoadFromFile from not matching incoming urls, or being bypassed altogether,because there's a lot of things going on in the configuration.I'd be inclined to build a developer version [1] of nginx/ngx_pagespeed and fire up the debugger.Probably setting a breakpoint on net_instaweb::FileLoadPolicy::ShouldLoadFromFilewill be worth it, and I would be interested in what the value of "url" is when thatmethod is called. Another option is that FileLoadPolicy::ShouldLoadFromFile isn't calledat all, in which case turning on the nginx debug logging [2] may be helpful to see if the responseactually is flowing through ngx_pagespeed.
On Mon, Jun 4, 2018 at 11:42 AM <sh...@salonguru.net> wrote:
Any joy on this yet?--Shane :)
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.