Learn about Centmin Mod LEMP Stack today
Register Now

Nginx PageSpeed Chrome console errors for pagespeed

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by tdubs, Jun 16, 2015.

  1. tdubs

    tdubs Member

    83
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    7:42 PM
    1.7.12
    10.0.17
    Hello,

    I noticed while monitoring some network stuff using the console in Google Chrome that there were some errors and warnings with pagespeed. I'm not sure why these are appearing or how to fix them. It's not causing any problems with my forum as far as I'm aware, but I want to know how to go about addressing these things.

    Code:
    XenForo.activate(#document)
    XenForo.init() 329ms. jQuery 1.11.0/1.2.8-dev
    StyleIt init()
    #si-style added to head
    #styleit-wrapper not found, appending to body
    Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
    styleit: preset "default.si" loaded!
    XenForo.activate(e.fn.init[36])
    Failed to load resource: the server responded with a status of 404 (Not Found)
    XenForo.activate(e.fn.init[1])
    XenForo.activate([li#taigachat_message_17219.taigachat_new, prevObject: n.fn.init[1], context: document, selector: ".taigachat_new"])
    
    [​IMG]
    Thank you.
     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:42 PM
    Nginx 1.13.x
    MariaDB 5.5
    what version of chrome and centmin mod ? nginx version ?

    also check for xenforo disallows for pagespeed.conf at Nginx PageSpeed - This forum's pagespeed.conf | Centmin Mod Community

    looks related to taigachat xenforo addon, if you disable addon do you get errors ? you may need to exclude some taigachat css and/or js from pagespeed via pagespeed.conf disallow

    maybe @RoldanLT would have some clues as he uses chat ?
     
  3. tdubs

    tdubs Member

    83
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    7:42 PM
    1.7.12
    10.0.17
    I am using:
    • Chrome - 43.0.2357.124 m (Latest)
    • Centmin Mod - 1.2.3-eva2000.07
    • Nginx - 1.9.1
    I disabled Taigachat and I used your pagespeed.conf and I am still getting the same errors.
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:42 PM
    Nginx 1.13.x
    MariaDB 5.5
    do you get such errors on this forum ?
     
  5. tdubs

    tdubs Member

    83
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    7:42 PM
    1.7.12
    10.0.17
    I get this:

    [​IMG]

    I'm mainly just wondering what the Synchronous warning is about along with not being able to find domain.com/none because I obviously don't have a file called 'none' located on my server.
     
    Last edited: Jun 16, 2015
  6. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:42 PM
    Nginx 1.13.x
    MariaDB 5.5
    well my xenforo.js is excluded from pagespeed.conf so it ain't related to pagespeed so not sure what yours would be
     
    • Like Like x 1
  7. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    5:42 PM
    1.11
    10.2
    I'm sorry, not using ngx_pagespeed right now.
    I have to freshen up my OVH server.
     
  8. tdubs

    tdubs Member

    83
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    7:42 PM
    1.7.12
    10.0.17
    I noticed these after uncommenting the pagespeed includes in domain.com.conf and then running the pscontrol on command.

    Code:
    nginx: [warn] [ngx_pagespeed 1.9.32.3-4448] [0616/081418:WARNING:google_message_handler.cc(38)] 'MessageBufferSize' is global and is ignored at this scope
    nginx: [warn] conflicting server name "domain.com" on 0.0.0.0:80, ignored
    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: nginx: [warn] [ngx_pagespeed 1.9.32.3-4448] [0616/081418:WARNING:google_message_handler.cc(38)] 'MessageBufferSize' is global and is ignored at this scope
    nginx: [warn] conflicting server name "domain.com" on 0.0.0.0:80, ignored
                                                               [  OK  ]
    
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:42 PM
    Nginx 1.13.x
    MariaDB 5.5
    what's output of

    Code:
    grep -Ro 'domain.com' /usr/local/nginx/conf/conf.d/*
     
  10. tdubs

    tdubs Member

    83
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    7:42 PM
    1.7.12
    10.0.17
    Code:
    /usr/local/nginx/conf/conf.d/domain.com.conf:domain.com
    /usr/local/nginx/conf/conf.d/domain.com.conf:domain.com
    /usr/local/nginx/conf/conf.d/domain.com.conf:domain.com
    /usr/local/nginx/conf/conf.d/domain.com.conf:domain.com
    /usr/local/nginx/conf/conf.d/domain.com.conf:domain.com
    /usr/local/nginx/conf/conf.d/domain.com.conf:domain.com
    /usr/local/nginx/conf/conf.d/domain.com.conf:domain.com
    /usr/local/nginx/conf/conf.d/virtual.conf:domain.com
    
     
  11. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:42 PM
    Nginx 1.13.x
    MariaDB 5.5
    there's your problem /usr/local/nginx/conf/conf.d/virtual.conf should have set server_name to server main hostname while domain.com.conf has domain name see step 1 of Getting Started Guide.
     
  12. tdubs

    tdubs Member

    83
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    7:42 PM
    1.7.12
    10.0.17
    I've already had this step done.

    Verifying the hostname.
    Code:
    [root@server ~]# uname -n
    server.mydomain.com
    
    Verifying the system network file.
    Code:
    [root@server ~]# nano -w /etc/sysconfig/network
    
    NETWORKING=yes
    NETWORKING_IPV6=yes
    HOSTNAME=server.mydomain.com
    GATEWAY=xx.xxx.xx.xxx
    IPV6_AUTOCONF=no
    
    Verifying the hosts file.
    Code:
    [root@server ~]# nano -w /etc/hosts
    
    127.0.0.1               localhost.localdomain localhost
    xx.xxx.xx.xxx                  server.mydomain.com
    
    Verifying the virtual.conf file.
    Code:
    [root@server ~]# nano -w /usr/local/nginx/conf/conf.d/virtual.conf
    
    server {
    #         listen   80;
                listen   80 default_server backlog=2048;
                server_name server.mydomain.com;
                root   html;
    
     
  13. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:42 PM
    Nginx 1.13.x
    MariaDB 5.5
    so it shouldn't of matched same server_name in /usr/local/nginx/conf/conf.d/domain.com.conf. As virtual.conf and /usr/local/nginx/conf/conf.d/domain.com.conf need to have different server_name values
     
  14. tdubs

    tdubs Member

    83
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    7:42 PM
    1.7.12
    10.0.17
    They're different.

    /usr/local/nginx/conf/conf.d/domain.com.conf
    Code:
    server {
                listen   80;
                server_name mydomain.com;
                return 301 $scheme://www.mydomain.com$request_uri;
           }
    
     
  15. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:42 PM
    Nginx 1.13.x
    MariaDB 5.5
    strange then as i do not see anyway it would be reporting conflicting server_name on restarts

    expand the grep to see content using command
    Code:
    grep -Rn -C5 'domain.com' /usr/local/nginx/conf/conf.d/*
     
  16. tdubs

    tdubs Member

    83
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    7:42 PM
    1.7.12
    10.0.17
    Code:
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-1-# redirect from non-www to www
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-2-# uncomment, save file and restart Nginx to enable
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-3-server {
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-4-            listen   80;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:5:            server_name mydomain.com;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:6:            return 301 $scheme://www.mydomain.com$request_uri;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-7-       }
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-8-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-9-server {
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-10-# Cloudflare
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-11-set_real_ip_from 199.27.128.0/21;
    --
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-21-set_real_ip_from 198.41.128.0/17;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-22-set_real_ip_from 162.158.0.0/15;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-23-set_real_ip_from 104.16.0.0/12;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-24-real_ip_header CF-Connecting-IP;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-25-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:26:  server_name mydomain.com www.mydomain.com;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-27-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-28-# ngx_pagespeed & ngx_pagespeed handler
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-29-include /usr/local/nginx/conf/pagespeed.conf;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-30-include /usr/local/nginx/conf/pagespeedhandler.conf;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-31-include /usr/local/nginx/conf/pagespeedstatslog.conf;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-32-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-33-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-34-  # limit_conn limit_per_ip 16;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-35-  # ssi  on;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-36-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:37:  access_log /home/nginx/domains/mydomain.com/log/access.log combined buffer=32k;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:38:  error_log /home/nginx/domains/mydomain.com/log/error.log;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-39-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:40:  root /home/nginx/domains/mydomain.com/public;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-41-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-42-  location / {
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-43-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-44-# block common exploits, sql injections etc
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-45-#include /usr/local/nginx/conf/block.conf;
    --
    /usr/local/nginx/conf/conf.d/virtual.conf-1-server {
    /usr/local/nginx/conf/conf.d/virtual.conf-2-#         listen   80;
    /usr/local/nginx/conf/conf.d/virtual.conf-3-            listen   80 default_server backlog=2048;
    /usr/local/nginx/conf/conf.d/virtual.conf:4:            server_name server.mydomain.com;
    /usr/local/nginx/conf/conf.d/virtual.conf-5-            root   html;
    /usr/local/nginx/conf/conf.d/virtual.conf-6-
    /usr/local/nginx/conf/conf.d/virtual.conf-7-        access_log              /var/log/nginx/localhost.access.log     main buffer=32k;
    /usr/local/nginx/conf/conf.d/virtual.conf-8-        error_log               /var/log/nginx/localhost.error.log      error;
    /usr/local/nginx/conf/conf.d/virtual.conf-9-
    
    If you're wondering, I'm using "mydomain.com" to replace my actual domain for privacy purposes.
     
  17. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:42 PM
    Nginx 1.13.x
    MariaDB 5.5
    clearly that's correctly configured so no idea right now

    if you do another nginx restart, same error ? only if /usr/local/nginx/conf/pagespeed.conf etc uncommented ?

    if so let's check one directory above /conf.d

    Code:
    grep -Rn -C5 'domain.com' /usr/local/nginx/conf/*
     
  18. tdubs

    tdubs Member

    83
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    7:42 PM
    1.7.12
    10.0.17
    The error below occurs when restarting nginx with the pagespeed information uncommented in /usr/local/nginx/conf/conf.d/mydomain.com.conf

    Code:
    nginx: [warn] [ngx_pagespeed 1.9.32.3-4448] [0616/081418:WARNING:google_message_handler.cc(38)] 'MessageBufferSize' is global and is ignored at this scope
    nginx: [warn] conflicting server name "domain.com" on 0.0.0.0:80, ignored
    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: nginx: [warn] [ngx_pagespeed 1.9.32.3-4448] [0616/081418:WARNING:google_message_handler.cc(38)] 'MessageBufferSize' is global and is ignored at this scope
    nginx: [warn] conflicting server name "domain.com" on 0.0.0.0:80, ignored
                                                               [  OK  ]
    The error below occurs when restarting nginx with the pagespeed information commented in /usr/local/nginx/conf/conf.d/mydomain.com.conf

    Code:
    [root@server ~]# ngxrestart
    nginx: [warn] conflicting server name "mydomain.com" on 0.0.0.0:80, ignored
    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: nginx: [warn] conflicting server name "mydomain.com" on 0.0.0.0:80, ignored
                                                               [  OK  ]
    
    
    Output of the command you've given me:
    Code:
    [root@server ~]# grep -Rn -C5 'mydomain.com' /usr/local/nginx/conf/*
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-1-# redirect from non-www to www
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-2-# uncomment, save file and restart Nginx to enable
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-3-server {
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-4-            listen   80;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:5:            server_name mydomain.com;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:6:            return 301 $scheme://www.mydomain.com$request_uri;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-7-       }
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-8-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-9-server {
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-10-# Cloudflare
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-11-set_real_ip_from 199.27.128.0/21;
    --
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-21-set_real_ip_from 198.41.128.0/17;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-22-set_real_ip_from 162.158.0.0/15;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-23-set_real_ip_from 104.16.0.0/12;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-24-real_ip_header CF-Connecting-IP;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-25-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:26:  server_name mydomain.com www.mydomain.com;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-27-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-28-# ngx_pagespeed & ngx_pagespeed handler
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-29-include /usr/local/nginx/conf/pagespeed.conf;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-30-include /usr/local/nginx/conf/pagespeedhandler.conf;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-31-include /usr/local/nginx/conf/pagespeedstatslog.conf;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-32-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-33-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-34-  # limit_conn limit_per_ip 16;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-35-  # ssi  on;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-36-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:37:  access_log /home/nginx/domains/mydomain.com/log/access.log combined buffer=32k;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:38:  error_log /home/nginx/domains/mydomain.com/log/error.log;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-39-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:40:  root /home/nginx/domains/mydomain.com/public;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-41-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-42-  location / {
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-43-
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-44-# block common exploits, sql injections etc
    /usr/local/nginx/conf/conf.d/mydomain.com.conf-45-#include /usr/local/nginx/conf/block.conf;
    --
    /usr/local/nginx/conf/conf.d/virtual.conf-1-server {
    /usr/local/nginx/conf/conf.d/virtual.conf-2-#         listen   80;
    /usr/local/nginx/conf/conf.d/virtual.conf-3-            listen   80 default_server backlog=2048;
    /usr/local/nginx/conf/conf.d/virtual.conf:4:            server_name server.mydomain.com;
    /usr/local/nginx/conf/conf.d/virtual.conf-5-            root   html;
    /usr/local/nginx/conf/conf.d/virtual.conf-6-
    /usr/local/nginx/conf/conf.d/virtual.conf-7-        access_log              /var/log/nginx/localhost.access.log     main buffer=32k;
    /usr/local/nginx/conf/conf.d/virtual.conf-8-        error_log               /var/log/nginx/localhost.error.log      error;
    /usr/local/nginx/conf/conf.d/virtual.conf-9-
    --
    /usr/local/nginx/conf/pagespeed.conf-1-pagespeed on;
    /usr/local/nginx/conf/pagespeed.conf-2-
    /usr/local/nginx/conf/pagespeed.conf:3:pagespeed LoadFromFile "http://mydomain.com" "/home/nginx/domains/mydomain.com/public";
    /usr/local/nginx/conf/pagespeed.conf-4-
    /usr/local/nginx/conf/pagespeed.conf-5-pagespeed Disallow */js/dark/postrating.js*;
    /usr/local/nginx/conf/pagespeed.conf-6-pagespeed Disallow */js/dark/taigachat.js*;
    /usr/local/nginx/conf/pagespeed.conf-7-pagespeed Disallow */js/dark/taigachat_color_picker.js*;
    /usr/local/nginx/conf/pagespeed.conf-8-pagespeed Disallow */js/xenforo/tabalerts.js*;
    Just out of curiosity, do I need to uncomment the pagespeed information in virtual.conf like I did in mydomain.com.conf?
    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;
     
  19. tdubs

    tdubs Member

    83
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    7:42 PM
    1.7.12
    10.0.17
    I'm guessing there's no fix then?
     
  20. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:42 PM
    Nginx 1.13.x
    MariaDB 5.5
    well i can't see where it's duplicated.. anyway it's a warning which can be ignored so should still work fine.
     
    • Like Like x 1