Want to subscribe to topics you're interested in?
Become a Member

Nginx PageSpeed How can i disable it after installation?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Oct 10, 2014.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,844
    377
    83
    May 31, 2014
    Ratings:
    +723
    Local Time:
    5:21 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hi

    How can i disable the pagespeed after Centminmod installation?

    Thanks
     
  2. Razib Hasan

    Razib Hasan Member

    34
    13
    8
    May 31, 2014
    Dhaka, Bangladesh
    Ratings:
    +13
    Local Time:
    8:21 AM
    1.7.6
    5.10
    From terminal type this command "pscontrol off" and hit enter.
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,844
    377
    83
    May 31, 2014
    Ratings:
    +723
    Local Time:
    5:21 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Do i have to restart anything like Nginx after this command?

    On invision forum some times the forums indicator doesn't appear :(

    When it works the link is like this:

    Code:
    http://www.mydomain.com/public/style_images/Rock_Raiders_United/f_icon.png.pagespeed.ce.6oFYotts49.png
    and when not i am getting something like this:

    Code:
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAWCAMAAAD3n0w0AAAAPFBMVEUlJSYmJicoKCkoKCkqKisrKywsLC0lJSYuLi8mJicvLzAyMjMnJyg5OTo/P0A5OTolJSYrKywlJSZmZmeMphDYAAAAEnRSTlOztLW2t7i5urq8vL7Fy8vS6u4UZd+dAAAAV0lEQVQY023ICQ6AIBBD0bqyCwz3v6sSgxjoS5rMfOR4DWJGcHrgAqyeWGgCJ8HjQbzR+74a96qUvgePG8HjSvC4EDyauRkkhYFKkKb+7fxHIVFI/C65Aaf8DHmKwmO8AAAAAElFTkSuQmCC
    
    And i am thinking to disable the pagespeed as this maybe is the problem ... ?
     
  4. Razib Hasan

    Razib Hasan Member

    34
    13
    8
    May 31, 2014
    Dhaka, Bangladesh
    Ratings:
    +13
    Local Time:
    8:21 AM
    1.7.6
    5.10
  5. eva2000

    eva2000 Administrator Staff Member

    45,188
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    12:21 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  6. pamamolf

    pamamolf Premium Member Premium Member

    3,844
    377
    83
    May 31, 2014
    Ratings:
    +723
    Local Time:
    5:21 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    I just did a default Centminmod installation setup from .07 stable package and it seems that i got it as default.....

    What do you think about this problem George?
     
  7. eva2000

    eva2000 Administrator Staff Member

    45,188
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    12:21 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    in /usr/local/nginx/conf/pagespeed.conf pagespeed on or off set ?

    post the contents of your domain's Nginx vhost
     
  8. pamamolf

    pamamolf Premium Member Premium Member

    3,844
    377
    83
    May 31, 2014
    Ratings:
    +723
    Local Time:
    5:21 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    pagespeed off;

    But why i get this link on firebug? :
    Code:
    http://www.mydomain.com/public/style_images/Rock_Raiders_United/f_icon.png.pagespeed.ce.6oFYotts49.png
    and then sometimes the indicator is not coming up some times and when i check with firebug i get this instead of the link?
    Code:
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAWCAMAAAD3n0w0AAAAPFBMVEUlJSYmJicoKCkoKCkqKisrKywsLC0lJSYuLi8mJicvLzAyMjMnJyg5OTo/P0A5OTolJSYrKywlJSZmZmeMphDYAAAAEnRSTlOztLW2t7i5urq8vL7Fy8vS6u4UZd+dAAAAV0lEQVQY023ICQ6AIBBD0bqyCwz3v6sSgxjoS5rMfOR4DWJGcHrgAqyeWGgCJ8HjQbzR+74a96qUvgePG8HjSvC4EDyauRkkhYFKkKb+7fxHIVFI/C65Aaf8DHmKwmO8AAAAAElFTkSuQmCC
    
    Thanks George !
     
  9. eva2000

    eva2000 Administrator Staff Member

    45,188
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    12:21 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    post the contents of your domain's Nginx vhost
     
  10. eva2000

    eva2000 Administrator Staff Member

    45,188
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    12:21 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    If you want to tune your forums for ngx_pagespeed and it's actually enabled read ngx_pagespeed install on Centmin Mod - Menu based Nginx installer for CentOS servers to familiarize yourself with pagespeed.conf and options for Centmin Mod's ngx_pagespeed integration and then read these thread for some specific pagespeed tweaks for IP Board at http://community.invisionpower.com/...ation-options-for-mod-pagespeedngx-pagespeed/ and http://community.invisionpower.com/topic/397051-pagespeed-web-server-module/

    don't go replacing sections of pagespeed.conf with the suggestions in those threads, but editing or adding to existing pagespeed.conf formatted file - makes easier to follow changes
     
  11. pamamolf

    pamamolf Premium Member Premium Member

    3,844
    377
    83
    May 31, 2014
    Ratings:
    +723
    Local Time:
    5:21 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    #server {
    # listen 80;
    # server_name mydomain.com;
    # return 301 $scheme://www.mydomain.com$request_uri;
    # }

    server {
    server_name mydomain.com www.mydomain.com;

    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;

    # limit_conn limit_per_ip 16;
    # ssi on;

    access_log /home/nginx/domains/mydomain.com/log/access.log combined buffer=32k;
    error_log /home/nginx/domains/mydomain.com/log/error.log;

    root /home/nginx/domains/mydomain.com/public;

    location / {

    # block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;

    # Enables directory listings when index file not found
    #autoindex on;

    # Shows file listing times as local time
    #autoindex_localtime on;

    # Enable for vBulletin usage WITHOUT vbSEO installed
    try_files $uri $uri/ /index.php;

    }

    include /usr/local/nginx/conf/staticfiles.conf;
    include /usr/local/nginx/conf/php.conf;
    include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    }
     
  12. eva2000

    eva2000 Administrator Staff Member

    45,188
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    12:21 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    strange then pagespeed files are commented out
    Code:
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    so shouldn't enable pagespeed, try adding to your nginx vhost the line
    Code:
    pagespeed off;
    Code:
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    #server {
    # listen 80;
    # server_name mydomain.com;
    # return 301 $scheme://www.mydomain.com$request_uri;
    # }
    
    server {
    server_name mydomain.com www.mydomain.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    pagespeed off;
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
    # limit_conn limit_per_ip 16;
    # ssi on;
    
    access_log /home/nginx/domains/mydomain.com/log/access.log combined buffer=32k;
    error_log /home/nginx/domains/mydomain.com/log/error.log;
    
    root /home/nginx/domains/mydomain.com/public;
    
    location / {
    
    # block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;
    
    # Enables directory listings when index file not found
    #autoindex on;
    
    # Shows file listing times as local time
    #autoindex_localtime on;
    
    # Enable for vBulletin usage WITHOUT vbSEO installed
    try_files $uri $uri/ /index.php;
    
    }
    
    include /usr/local/nginx/conf/staticfiles.conf;
    include /usr/local/nginx/conf/php.conf;
    include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    }
    then restart nginx to see if pagespeed is disabled.. might be something new in ngx_pagespeed 1.9.32.1 beta
     
  13. pamamolf

    pamamolf Premium Member Premium Member

    3,844
    377
    83
    May 31, 2014
    Ratings:
    +723
    Local Time:
    5:21 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Ok done :)

    [root@server ~]# ngxrestart
    [1009/225954:INFO:google_message_handler.cc(35)] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
    Stopping nginx: [ OK ]
    Starting nginx: [1009/225954:INFO:google_message_handler.cc(35)] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    [ OK ]
    You have new mail in /var/spool/mail/root

    And now i can check from firebug that is not loaded (pagespeed) and the link for the image indicator looks ok now:

    Code:
    <img src="http://www.mydomain.com/public/style_images/Rock_Raiders_United/f_icon.png" style="background-color: rgb(120, 160, 227);">
    Great :)

    Please check it George and try to automate that as i will always forgot to add this pagespeed off; on every virtual host everytime :)
     
  14. eva2000

    eva2000 Administrator Staff Member

    45,188
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    12:21 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    thanks for the confirmation, so something changed in ngx_pagepseed 1.9.32.1 to enable it by default, this wasn't the behaviour prior versions of ngx_pagespeed which when those 3 commented out pagespeed include files were in place, ngx_pagespeed would be disabled and only enabled when those 3 pagespeed include files were uncommented and when pscontrol on command ran to turn pagespeed on in pagespeed.conf

    posting question at Google Groups
     
  15. pamamolf

    pamamolf Premium Member Premium Member

    3,844
    377
    83
    May 31, 2014
    Ratings:
    +723
    Local Time:
    5:21 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Ok just let us know how is going and if you find a way to adjust the default Centminmod installation so we will get this disabled as default... :)

    Thanks for your help :)
     
  16. pamamolf

    pamamolf Premium Member Premium Member

    3,844
    377
    83
    May 31, 2014
    Ratings:
    +723
    Local Time:
    5:21 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    They reply :

    Google Groups

    It seems that you must add a workaround on Centminmod so we will get always on vhost config files also the pagespeed off; ....?
     
  17. eva2000

    eva2000 Administrator Staff Member

    45,188
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    12:21 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    indeed behaviour has changed in 1.9.32.1 so will need a work around :)
    indeed looks like from Centmin Mod Nginx + ngx_pagespeed 1.9.32.1 beta point of view, need a workaround for the ngx_pagespeed 1.9.32.1 changed behaviour by adding an additional pagespeed on/off setting in /usr/local/nginx/conf/pagespeedadmin.conf and modifying pscontrol script to turn on/off pagespeed from both pagespeed on/off instances located in both /usr/local/nginx/conf/pagespeedadmin.conf and /usr/local/nginx/conf/pagespeed.conf files.

    I have started with updating Centmin Mod .08 beta01 with such changes (not yet tested) with commit at update for ngx_pagespeed 1.9.32.1 beta changed behaviour for .08 beta · 4bc1bbd · centminmod/centminmod · GitHub Will eventually do Centmin Mod .07 stable.
     
  18. pamamolf

    pamamolf Premium Member Premium Member

    3,844
    377
    83
    May 31, 2014
    Ratings:
    +723
    Local Time:
    5:21 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Please just reply here when you add a fix so i know about it and do not add manually anything related to disable it manually :)
     
  19. eva2000

    eva2000 Administrator Staff Member

    45,188
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    12:21 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x