Can't get http/2 working

Discussion in 'General' started by Jean-François Questiaux, Jan 14, 2018.

  1. Hi,
    I have a debian 9 server with http2 mod enabled, but it has no effect because the mpm-prefork module is enabled.
    Problem is, I can't disable it (and enable mpm-event for instance): everytime Apache restart, prefork is enabled.
    If I force to remove it by deleting the "mods-available" link, Apache2 does not start.
    I know that to use mpm-event or worker, you need to use PHP-FPM.
    This is installed but I don't know how to configure it to have it working.
    Thanks in advance for any help.
     
  2. I made some progress:
    • PHP-FPM is enabled for the server and the virtual host
    • mod_php (at least I guess that what php7 module is) is disabled
    • mpm-prefork is disabled and mpm-worker is enabled (if mpm-event is enabled instead, Apache does not start)
    • proxy_fcgi is enabled
    • http2 is enabled
    The website works normally and confirm that it's running with fpm-fcgi but it's still in http/1.1 so I guess I'm still missing something.
     
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Last edited: Jan 17, 2018
  4. It is specified at the server level and also at the vhost level.
    Actually it turned out that the problem lies at the browser level: it seems that none of the browsers on Mac I'm using (Safari 11, Firefox 57 and Chrome 63) support http/2 correctly, while Chrome 63 on Windows 10 does!
    So when you run some tests, like Lighthouse for instance, you get different results depending on the platform: I get a 100 % result on Windows and a 88 % on Mac!
    I learned something but what a waste of time!
    Thanks for your suggestion anyway.
     
  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

Share This Page