Only remove_comments works well, all other filters do not work. Why?

17 views
Skip to first unread message

Slava P.

unread,
Jul 24, 2015, 9:25:58 AM7/24/15
to ngx-pagespeed-discuss
Hi all,

i'm trying to configure http://dev.tn-company.com/ to work with page speed nginx module. The module itself works fine, but filters doesn't seem to work but remove_comments.
I was trying default RewriteLevel config and ended up what it is now:


Version: 13: on

Filters
cc	Combine Css
hw	Flushes html
cf	Rewrite Css
jm	Rewrite External Javascript
jj	Rewrite Inline Javascript

Options
  AdminPath (nap)                              /pagespeed_admin
  AvoidRenamingIntrospectiveJavascript (aris)  True
  BeaconUrl (bu)                               /ngx_pagespeed_beacon
  ConsolePath (ncp)                            /pagespeed_console
  EnableRewriting (e)                          1
  FileCacheInodeLimit (afcl)                   500000
  FileCachePath (afcp)                         /var/ngx_pagespeed_cache
  LogDir (ald)                                 /var/log/pagespeed
  MaxCombinedJsBytes (xcj)                     921600
  MessagesPath (nmp)                           /ngx_pagespeed_message
  RewriteLevel (l)                             Pass Through
  Statistics (ase)                             True
  StatisticsLogging (asle)                     True
  StatisticsLoggingIntervalMs (asli)           60000
  StatisticsLoggingMaxFileSizeKb (aslfs)       1024
  StatisticsPath (nsp)                         /ngx_pagespeed_statistics

Domain Lawyer

Invalidation Timestamp: (none)


Help is appreciated

best

Jeff Kaufman

unread,
Jul 24, 2015, 10:02:52 AM7/24/15
to ngx-pagesp...@googlegroups.com
I'm seeing "RewriteLevel (l)                             Pass Through" in what you posted, which is surprising.  Could you paste your PageSpeed configuration directives?

--
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 http://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.

Slava P.

unread,
Jul 24, 2015, 10:31:19 AM7/24/15
to ngx-pagesp...@googlegroups.com
Thank you for prompt reply.
Originally we had no RewriteLevel line and i suppose it was  CoreFilters level but situation was the same: filters didn't work. Here are my configs



sites-available/server.conf

server {
    listen 80 default_server;
    set $host_path "/home/avars/test/green";
    root        $host_path/www ;
        set $yii_bootstrap "index.php";
        charset utf-8;
auth_basic "Please enter ' test ' as login and ' test ' as password!";
auth_basic_user_file  /home/avars/mig/work/account/test.pass;

expires 30d;
gzip on;
gzip_types '*';


pagespeed on;

pagespeed Statistics on;
pagespeed StatisticsLogging on;
pagespeed StatisticsLoggingIntervalMs 60000;
pagespeed StatisticsLoggingMaxFileSizeKb 1024;
pagespeed StatisticsPath /ngx_pagespeed_statistics;
#pagespeed GlobalStatisticsPath /ngx_pagespeed_global_statistics;
pagespeed MessagesPath /ngx_pagespeed_message;
pagespeed MessageBufferSize 100000;
pagespeed ConsolePath /pagespeed_console;
pagespeed AdminPath /pagespeed_admin;
#pagespeed GlobalAdminPath /pagespeed_global_admin;
pagespeed FileCachePath /var/ngx_pagespeed_cache;
pagespeed Statistics on;
pagespeed StatisticsLogging on;
pagespeed LogDir /var/log/pagespeed;
pagespeed RewriteLevel PassThrough;

location /ngx_pagespeed_statistics { allow 127.0.0.1;allow  134.17.24.251; allow 192.168.1.0/24;   }
location /ngx_pagespeed_global_statistics { allow 127.0.0.1;allow  134.17.24.251; allow 192.168.1.0/24;   }
location /ngx_pagespeed_message { allow 127.0.0.1;allow  134.17.24.251; allow 192.168.1.0/24;   }
location /pagespeed_console { allow 127.0.0.1;allow  134.17.24.251; allow 192.168.1.0/24;   }
location ~ ^/pagespeed_admin { allow 127.0.0.1;allow  134.17.24.251; allow 192.168.1.0/24; }
location ~ ^/pagespeed_global_admin { allow 127.0.0.1; allow  134.17.24.251; allow 192.168.1.0/24;  }
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
 add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }


        
        location / {
       index  index.html $yii_bootstrap;
        try_files $uri $uri/ /$yii_bootstrap?$args;
        }

         location ~ ^/(protected|framework|themes/\w+/views) {
             deny  all;
        }

location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
if ($uri ~ \.(jpg|png)$ ) {
gzip off;
}

        try_files $uri =404;

    }
    location ~ \.php {

        fastcgi_split_path_info  ^(.+\.php)(.*)$;

if ( $request_uri ~ /site/requestcallback ) {
gzip off;
}


        set $fsn /$yii_bootstrap;

        if (-f $document_root$fastcgi_script_name){

            set $fsn $fastcgi_script_name;

        }



        fastcgi_pass   127.0.0.1:9000;

        include fastcgi_params;

        fastcgi_param  SCRIPT_FILENAME  $document_root$fsn;




        fastcgi_param  PATH_INFO        $fastcgi_path_info;

        fastcgi_param  PATH_TRANSLATED  $document_root$fsn;

    }




    location ~ /\. {

        deny all;

        access_log off;

        log_not_found off;

    }



    
}




--
You received this message because you are subscribed to a topic in the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ngx-pagespeed-discuss/Blykf9zmXls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ngx-pagespeed-di...@googlegroups.com.



--
Sincerely, Slava P.

Jeff Kaufman

unread,
Jul 24, 2015, 10:57:27 AM7/24/15
to ngx-pagesp...@googlegroups.com
The line "pagespeed RewriteLevel PassThrough;" is keeping optimizations from running.

Once you remove that line, though, optimizations that require fetching resources from your server (most of them) still won't work because you have authorization enabled.  This means when PageSpeed sees <img src=foo.jpg> in the html, and tries to get a copy of "foo.jpg" to optimize, it won't get past your authentication.


Slava P.

unread,
Jul 24, 2015, 11:14:13 AM7/24/15
to ngx-pagespeed-discuss, papov...@gmail.com
I have removed auth and Pass throug

Here is current config but result is the same so far
Version: 13: on

Filters
ah	Add Head
cc	Combine Css
jc	Combine Javascript
gp	Convert Gif to Png
jp	Convert Jpeg to Progressive
jw	Convert Jpeg To Webp
mc	Convert Meta Tags
pj	Convert Png to Jpeg
ec	Cache Extend Css
ei	Cache Extend Images
es	Cache Extend Scripts
fc	Fallback Rewrite Css 
if	Flatten CSS Imports
hw	Flushes html
ci	Inline Css
ii	Inline Images
il	Inline @import to Link
ji	Inline Javascript
js	Jpeg Subsampling
rj	Recompress Jpeg
rp	Recompress Png
rw	Recompress Webp
ri	Resize Images
cf	Rewrite Css
jm	Rewrite External Javascript
jj	Rewrite Inline Javascript
cu	Rewrite Style Attributes With Url
cp	Strip Image Color Profiles
md	Strip Image Meta Data

Options
  AdminPath (nap)                              /pagespeed_admin
  AvoidRenamingIntrospectiveJavascript (aris)  True
  BeaconUrl (bu)                               /ngx_pagespeed_beacon
  ConsolePath (ncp)                            /pagespeed_console
  EnableRewriting (e)                          1
  FileCacheInodeLimit (afcl)                   500000
  FileCachePath (afcp)                         /var/ngx_pagespeed_cache
  LogDir (ald)                                 /var/log/pagespeed
  MaxCombinedJsBytes (xcj)                     921600
  MessagesPath (nmp)                           /ngx_pagespeed_message
  RewriteLevel (l)                             Core Filters
  Statistics (ase)                             True
  StatisticsLogging (asle)                     True
  StatisticsLoggingIntervalMs (asli)           60000
  StatisticsLoggingMaxFileSizeKb (aslfs)       1024
  StatisticsPath (nsp)                         /ngx_pagespeed_statistics

Domain Lawyer

Invalidation Timestamp: (none)


Slava P.

unread,
Jul 24, 2015, 11:20:05 AM7/24/15
to ngx-pagespeed-discuss, papov...@gmail.com
ok, something seems have changed. I see now 
  1. Request URL:

I'll keep digging and will get back if required.

Thanks for help

best


On Friday, July 24, 2015 at 4:25:58 PM UTC+3, Slava P. wrote:

Jeff Kaufman

unread,
Jul 24, 2015, 11:21:11 AM7/24/15
to ngx-pagesp...@googlegroups.com, papov...@gmail.com
I think you may need to flush PageSpeed's cache; It's probably remembering that many of these urls 403'd before and isn't trying them again.

--
Reply all
Reply to author
Forward
0 new messages