Want more timely Centmin Mod News Updates?
Become a Member

Nginx PageSpeed If I'll try to use CDN

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by RoldanLT, Aug 18, 2014.

  1. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    There's no need for me to use ngx_pagespeed?
    Does ngx_pagespeed will not work any more on those content server by cdn?
    Sorry but didn't use CDN since :)
     
  2. eva2000

    eva2000 Administrator Staff Member

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    12:36 AM
    Nginx 1.13.x
    MariaDB 5.5
    Yeah CDN served static files will bypass ngx_pagespeed by default. You can use MapOriginDomain and MapRewriteDomain to work with CDNs apparently but I haven't played with it much myself especially for https SSL origins and CDN as CDN with SSL custom certificates usually cost alot i.e. US$600/yr with Cloudflare and US$699/yr with cdn77.com

    PageSpeed Authorizing and Mapping Domains - PageSpeed Module — Google Developers

     
    Last edited: Aug 18, 2014
  3. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    CDNify is free for Custom SSL :)
    Might be better than Cloudflare.
     
  4. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    I want to try 1 to 3 months, I got this coupon from their support: AWESOMESPEED20
     
    • Like Like x 1
  5. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    BPC15SPEED
    15% Off Any Plan For First 3 Months
     
    • Like Like x 1
  6. eva2000

    eva2000 Administrator Staff Member

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    12:36 AM
    Nginx 1.13.x
    MariaDB 5.5
  7. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    I just signup, the provided sub domain/temporary domain works fine with https :)
    So I will just use it for now, just for testing.
     
    • Like Like x 1
  8. eva2000

    eva2000 Administrator Staff Member

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    12:36 AM
    Nginx 1.13.x
    MariaDB 5.5
    Let us know how it goes :)
     
  9. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    Please advice, what should me the best settings here?
    Should i disable gzip? Why?
    upload_2014-8-18_2-52-48.png
     
  10. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    How can I apply this on my server?
    This is my temp CDN host name: phcorner.a.cdnify.io

    Code:
    pagespeed MapOriginDomain www.phcorner.net phcorner.a.cdnify.io;
    pagespeed MapRewriteDomain www.phcorner.net phcorner.a.cdnify.io;
     
  11. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
     
    • Like Like x 1
  12. eva2000

    eva2000 Administrator Staff Member

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    12:36 AM
    Nginx 1.13.x
    MariaDB 5.5
    sweet thanks for sharing

    I decided to try this out with KeyCDN first as they have free trials with 25GB of free data during the trials and allow free custom SSL certificates you upload yourself

    with KeyCDN they are still missing SPDY for SSL but it's coming soon but free testing of ngx_pagespeed it's okay

    this is what i use

    Code:
    pagespeed Domain cdn.example.com;
    pagespeed LoadFromFile "https://cdn.example.com" "/home/nginx/domains/example.com/public";
    
     
  13. eva2000

    eva2000 Administrator Staff Member

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    12:36 AM
    Nginx 1.13.x
    MariaDB 5.5
    trial and error there

    first one to stop index of cdn assest probably enable as to force ssl pulls try with and without
     
  14. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    WoW, they are almost half much cheaper than CDNify.
    If the micro plan is not enough for me, then I will transfer to KeyCDN, of course using your referral (y)

    I will try now your pagespeed code for CDN.

    I'm confuse here.

    But I force all my forum request to use https, so Maybe it's better to force also on my cdn settings :rolleyes:
     
  15. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    Implementing CDN my average load time increase a bit:
    upload_2014-8-19_14-36-29.png
     
  16. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    My config now:
    Code:
    # Custom for PHCorner.Net
    pagespeed LoadFromFile "http://www.phcorner.net" "/home/nginx/domains/phcorner.net/public";
    pagespeed LoadFromFile "https://www.phcorner.net" "/home/nginx/domains/phcorner.net/public";
    
    pagespeed Domain phcorner.a.cdnify.io;
    pagespeed LoadFromFile "http://phcorner.a.cdnify.io" "/home/nginx/domains/phcorner.net/public";
    pagespeed LoadFromFile "https://phcorner.a.cdnify.io" "/home/nginx/domains/phcorner.net/public";
    # End custom for PHCorner.Net
    But pagespeed not working on phcorner.a.cdnify.io resource like js,css,image.
     
  17. eva2000

    eva2000 Administrator Staff Member

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    12:36 AM
    Nginx 1.13.x
    MariaDB 5.5
    Nginx PageSpeed - Nginx Pagespeed Troubleshooting steps | Centmin Mod Community is your friend ;)

    yeah other thing is KeyCDN doesn't have SPDY SSL support yet
    That's why I said trial and error testing :)
     
    • Like Like x 1
  18. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    CDNify also temporarily disable SPDY due to maintenance, but it will be enable soon as they said.

    Did your ngx_pagespeed works fine with resources server by your CDN?

    I ask Keycdn support for a test IP of their Singapore, Hong Kong, japan and I got very slow ping with them.

    All the 3 small window is KEYCDN IP, and the big one is the current CDN i'm using which is CDNify.
    Usually Hong Kong and Singapore has 60-100 ping time to me, but with the IP keyCDN provided it's very slow.
    Screenshot from 2014-08-19 22:34:40.png
     
  19. eva2000

    eva2000 Administrator Staff Member

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    12:36 AM
    Nginx 1.13.x
    MariaDB 5.5
    Yeah my KeyCDN ngx_pagespeed worked fine with what they called zonealiases so I setup a CNAME for custom.mydomain.com to their zone name zonename.keycdn.com and referenced custom.mydomain.com in my pagespeed.conf with the 2 settings I listed above and restarted nginx for pagespeed.conf to come into effect.

    Only thing I not too fond of with KeyCDN, is no SPDY SSL yet and the http headers list HIT from zonename.keycdn.com as opposed to HIT from custom.mydomain.com
     
  20. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    10:36 PM
    1.11
    10.2
    Why not report it to them?