How to setup https/2?


  • | 152 points

    Hi,

    I am trying to do lighthouse tests on my local site (https://t21.test/), and its recommended to "Use HTTP/2".

    How can I implement this on laragon 4.0.16?

    The reason is - it makes a huge difference in scores, and I'm trying to improve speed.

    Thanks,

    Robert


  • | 183 points

    Hello @iamrobert,

    I just did this a week or so ago and found it to be surprisingly simple. Here's how:

    • Stop the Laragon servers: Laragon GUI > click Stop button
    • Open httpd.conf: Laragon GUI > Menu > Apache > httpd.conf
    • In httpd.conf, un-comment the line 'LoadModule http2_module modules/mod_http2.so'
    • In httpd.conf, below the line 'ServerName Laragon' insert a line 'Protocols h2 http/1.1' (without the quotes)

    You can verify that the HTTP/2 protocol is used with the developer tools for your browser.

    Information used (but not followed in all details, because it is for WampServer): https://dirask.com/posts/apache2-http2-h2-protocol-configuration-j4YP71.

    Good luck and best regards,
    Henk Barreveld


  • | 152 points

    Thanks so much Henk - that was super easy!


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.