Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx PageSpeed ngx_pagespeed 1.10.33.5 and configuration setup

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Feb 19, 2016.

  1. pamamolf

    pamamolf Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    7:22 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Ok i install it and and i am looking to check if it works :)

    Nginx -V shows the pagespeed module :)

    But where i can access the admin panel of pagespeed?

    Also i just notice here:
    Code:
    /usr/local/nginx/conf/pagespeed.conf
    /usr/local/nginx/conf/pagespeedadmin.conf
    
    this:
    Code:
    pagespeed off;
    Also on my domain conf file:
    Code:
    /usr/local/nginx/conf/conf.d/domain.com.conf
    I can see commented the:
    Code:
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    Are all the above values auto take care from the pagespeed setup?


    Thanks
     
    Last edited: Feb 19, 2016
  2. eva2000

    eva2000 Administrator Staff Member

    55,458
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    2:22 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  3. pamamolf

    pamamolf Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    7:22 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Ok thanks :)

    What about the :
    Code:
    pagespeed off;
    and
    Code:
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    ?
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,458
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    2:22 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    also outlined at Nginx PageSpeed - CentminMod.com LEMP Nginx web stack for CentOS for pscontrol command etc
     
  5. pamamolf

    pamamolf Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    7:22 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Ok all working now :)

    But can't set two values that i need using the pscontrol edit :

    Code:
    Purging not enabled: please add
      pagespeed EnableCachePurge on;
    I add this:

    Code:
    pagespeed EnableCachePurge on;
    and for this:
    Code:
    No permission to rewrite http://s1.tinypic.com/files/image.jpg
    i add this:

    Code:
    pagespeed Domain *.tinypic.com;
    Restart Nginx and checking i can't purge cache files again :(
     
  6. eva2000

    eva2000 Administrator Staff Member

    55,458
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    2:22 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  7. pamamolf

    pamamolf Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    7:22 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Ok as i can see there is no /var/cache/pagespeed/cache.flush such file so i can use :

    Code:
    rm -rf /var/ngx_pagespeed_cache/*
    ngxrestart
    How can i increase the cache size i am getting this?

    Code:
    Increase cache size
    
    Unable to insert object of size: 299836, cache limit is: 35616
    Does pagespeed do on the fly all the optimizations without touching my files (like images) ?
     
  8. eva2000

    eva2000 Administrator Staff Member

    55,458
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    2:22 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  9. pamamolf

    pamamolf Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    7:22 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Thanks for the info :)

    I hope it will not change my original files with default settings in Centminmod installation :)
     
  10. eva2000

    eva2000 Administrator Staff Member

    55,458
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    2:22 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    or just setup ngx_pagespeed admin console and just use purge feature there

    upload_2016-2-19_18-49-53.png
     
  11. pamamolf

    pamamolf Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    7:22 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    I got the error that i was post exactly there when i click Purge entire Cache :)

    Code:
    Purging not enabled: please add
      pagespeed EnableCachePurge on;
    and then i edit the config using pscontrol edit and i add it inside:
    Code:
    pagespeed EnableCachePurge on;
    Then restart Nginx but was not working (maybe a cache problem) ?
     
  12. pamamolf

    pamamolf Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    7:22 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Is there any file that hold all log data from:
    Code:
    http://hostname.domain.com/pagespeed_global_admin/message_history
    as i am getting a lot of entries there and i don't want to end up with a huge file on my disk ?
     
  13. eva2000

    eva2000 Administrator Staff Member

    55,458
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    2:22 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    read documentation the log is in memory not disk

    works for me
    Code:
    pagespeed on;
    
    pagespeed EnableCachePurge on;
    pagespeed PurgeMethod PURGE;
    Code:
    curl 'localhost/pagespeed_admin/cache?purge=*'                                
    Purge successful
    Code:
    curl --request PURGE 'localhost/*'
    Purge successful
     
    Last edited: Feb 19, 2016
  14. pamamolf

    pamamolf Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    7:22 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Thanks :)

    But inspecting with Chrome i can see that a few .js files are optimized by pagespeed.....

    Does the default installation is disabled for images like .jpg or .png ?
     
  15. eva2000

    eva2000 Administrator Staff Member

    55,458
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    2:22 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes some optimisations like images are disabled in pagespeed.conf (commented out etc), you have to configure and enable them yourself
     
  16. pamamolf

    pamamolf Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    7:22 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Ok thanks :)

    @RoldanLT

    Do you use pagespeed?

    What filters do you have enabled?

    Looking for some samples :)
     
    Last edited: Feb 20, 2016
  17. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    12:22 PM
    Mainline
    10.2
    I am not anymore.