http2 module nginx not working

前端 未结 2 1600
挽巷
挽巷 2021-01-23 08:03

I have some problem with enable http2 protocol in nginx. Site writes on Laravel 5 (but I think this doesn\'t matter).

First, I upgrade nginx version.

Deb         


        
相关标签:
2条回答
  • 2021-01-23 08:53

    Google Chrome now insists on using ALPN for HTTP/2 so you need to build Nginx with OpenSSL 1.0.2 or above (which isn't available as a packaged version on most platforms yet so you might have to install manually from source for now).

    https://ma.ttias.be/day-google-chrome-disables-http2-nearly-everyone-may-31st-2016/

    Check if it works for HTTP/2 in Opera and if so that's your problem.

    https://serverfault.com/questions/775298/debian-jessie-nginx-with-openssl-1-0-2-to-use-alpn-rather-than-npn

    0 讨论(0)
  • 2021-01-23 09:06

    I didn't immediately see any errors in your config, so first, the obvious: did you reload/restart Nginx?

    service nginx restart
    

    Then, I would double-check the results you're getting in Chrome by using a website such as https://tools.keycdn.com/http2-test. I would also check the server logs and see what HTTP version Nginx is reporting is being used.

    (Insufficient reputation to leave a comment)

    0 讨论(0)
提交回复
热议问题