Eugeny / ajenti-v

Virtual Hosting addon for Ajenti
ajenti.org/#product-ajenti-v
MIT License
225 stars 80 forks source link

Support of HTTP/2 #188

Closed zxcso closed 8 years ago

zxcso commented 9 years ago

Nginx has started the process to support http/2. And now they have release the first patch for nginx to support http/2, but ajenti-v don't support http/2, can it support http/2?

Xefir commented 8 years ago

Maybe it's a little bit to soon.

All current distributions will not apply this patch before a while, maybe waiting for a global release could be a better idea.

If you really want this feature, your could modify the ajenti nginx_templates.py to fit your needs.

kraftbj commented 8 years ago

the nginx development line in Ubuntu (really, mainline) has 1.9.6, which supports http2.

I'm not familiar with Python, but could we condintionally check for which version of nginx is present on the system and apply spdy or http2 accordingly?

danutzzzz commented 8 years ago

In my case (nginx 1.9.7), using SPDY results in a warning and it seems that it has been replaced already with http2. Having an option in Ajenti-V for HTTP2 would be nice.

(Already changed it myself in nginx.py on my install.)

ragnarkarlsson commented 8 years ago

danutzzzz what change did you make to nginx.py out of curiosity? I presume it was in the region of lines 118 to 121?

danutzzzz commented 8 years ago

on my server, in /var/lib/ajenti/plugins/vh-nginx/nginx.py I replaced SPDY on line 120 with HTTP2: ' http2' if x.spdy else '', Of course, this is a temporary solution and it does not replace the text "SPDY" in the admin, it just does the job by replacing outdated protocol spdy with http2 in the nginx hosts/config files.

Xefir commented 8 years ago

It's not outdated, since the http2 isn't in the stable branch of nginx development.

Yes it's on mainline branch, but it's the current stable dev version, not the very stable witch will be ready to package on regular serious distribs like debian or ubuntu LTS

I made a compromise to make everyone happy. My latest PR will add the checkbox and keep the spdy one too. You have the choice, check the one you want :)