Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

roulendz's avatar

How to get HTTP/2 with Laravel Forge on DigitalOcean(2.0)

Hello, everyone!

I am trying to figure out, how to get HTTP/2 with Laravel Forge on DigitalOcean(2.0)

I found this resource: https://serversforhackers.com/video/http-20-with-nginx

But no idea how to implement it with Forge and LetsEncrypt.

Does anyone has any resource, or there is some commands, what I can run in Forge to do this :)

Any help will be appreciated!

0 likes
8 replies
Reached's avatar

I think you have to use SSL to get http2 on Forge (someone please correct me if i'm wrong).

If you are installing a new site, and set up your domain with SSL Forge will automatically install HTTP2 as well.

roulendz's avatar

I installed my forge with LetsEncrypt in 2015-novembe

Hmm, but still HTTP/1.1

willvincent's avatar

@maxnb The easiest way to test for it that I've seen is to open the site in safari, which in the network tab of the inspector will show HTTP/2.0 200 on an asset (or page) loaded successfully via http/2.

There's an extension for Chrome that makes it easy to see.. I've not seen it clearly indicated within the inspector though.

ejdelmonico's avatar

Just do a curl -I theURL (that's a capital i). It will tell you the http value. I can say that all 6 of my DO Forge servers (all recent) are still serving http/1.1 even though Forge configured http/2.0 out of the box. But, I think @willvincent stated the best way right now. I get varying results with cURL and more consistent with HTTPie. New Safari seems the most consistent.

Please or to participate in this conversation.