Yunohost 3 & Http2

On Yunohost 3 (Debian 9), the nginx version is 1.10 and it support Http2. In the nginx configuration files, there’s the following lines commented

# Disabling http2 for now as it’s causing weird issues with curl
#listen 443 ssl http2;
#listen [::]:443 ssl http2;

Does someone test http2 on this version? Does it works? Any known problems?

In fact, it works, very well, and I enabled http2 in every website I have. There is just one known problem : curl installation. Indeed, http2 is incompatible with curl (at least we don’t know any solution). So, you can’t install wordpress if http2 is enable for example. But ofc, after installation, if you reenable is, it will work (same for upgrade).

There is no other problem for now we discovered.

1 Like

Thanks for so quick answer. I enable http2 on my different domains & subdomains and I’ll see if I encountered any problem, probably not.

Then, keep in mind that if you install wordpress, you will have to disable http2 during installation and then reenable it.

Same for the updates ?

@genma I’m using http2 too since wordpress installation & yunohost upgrade, it’s working fine :slight_smile

No, I checked. Only for installation of wordpress.

Hello,

I don’t know if it solve the http2 issue, but if you force curl to use https it work on my side :

# curl domain.tld
���
# curl https://domain.tld
<html>
<head><title>302 Found</title><script type="text/javascript" src="/ynhpanel.js"></script></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
# 

Don’t know. We need to test it with wordpress installation…

i think the nginx configuration is not optimized for http2: including add_header (preload) and gzip.

@antanof : uh could you elaborate ?


And headers are compressed with the purpose‑built HPACK protocol (rather than gzip, as in SPDY) :

Hello.
I’m very interessed about this feature in nginx.
If the curl problem is fixed with @Josue solution, is there a chance to see this feature enabled by default in a future update?

Yes, but we need to be sure that it fixes the issue somehow … So it’s up to anyone to test this - though it’s not really trivial to check. As far as I remember, the real issue was with package_check running on Wordpress with http2 enabled.

That might have something to do with the options used here https://github.com/YunoHost/yunohost/blob/477cf18a689c9cea0aa5d3ad729a162c120019d7/data/helpers.d/utils#L258

I tried on the CI a version with http2 and as I see, it’s not really a problem about http2. Adding a sleep 2 here fixed the install with http2.

1 Like

Well that look like a nice, easy fix :stuck_out_tongue: Maybe we could give http2 an other try then

Yes, we need to test more, but I just to say that it should be possible to enable http2. And if it broke something it should be easy to fix.

1 Like