Discover Centmin Mod today
Register Now

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 Premium Member Premium Member

    3,859
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    10:44 PM
    Nginx-1.17.x
    MariaDB 10.3.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

    45,444
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    6:44 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,859
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    10:44 PM
    Nginx-1.17.x
    MariaDB 10.3.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

    45,444
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    6:44 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    also outlined at Nginx PageSpeed - CentminMod.com LEMP Nginx web stack for CentOS for pscontrol command etc
     
  5. pamamolf

    pamamolf Premium Member Premium Member

    3,859
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    10:44 PM
    Nginx-1.17.x
    MariaDB 10.3.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

    45,444
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    6:44 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  7. pamamolf

    pamamolf Premium Member Premium Member

    3,859
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    10:44 PM
    Nginx-1.17.x
    MariaDB 10.3.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

    45,444
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    6:44 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  9. pamamolf

    pamamolf Premium Member Premium Member

    3,859
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    10:44 PM
    Nginx-1.17.x
    MariaDB 10.3.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

    45,444
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    6:44 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    or just setup ngx_pagespeed admin console and just use purge feature there

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

    pamamolf Premium Member Premium Member

    3,859
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    10:44 PM
    Nginx-1.17.x
    MariaDB 10.3.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 Premium Member Premium Member

    3,859
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    10:44 PM
    Nginx-1.17.x
    MariaDB 10.3.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

    45,444
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    6:44 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    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 Premium Member Premium Member

    3,859
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    10:44 PM
    Nginx-1.17.x
    MariaDB 10.3.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

    45,444
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    6:44 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    yes some optimisations like images are disabled in pagespeed.conf (commented out etc), you have to configure and enable them yourself
     
  16. pamamolf

    pamamolf Premium Member Premium Member

    3,859
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    10:44 PM
    Nginx-1.17.x
    MariaDB 10.3.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

    4,990
    1,190
    113
    May 25, 2014
    Ratings:
    +1,812
    Local Time:
    4:44 AM
    Mainline
    10.2
    I am not anymore.