Page 1 of 1

HTTP 2 Failing?

Posted: Thu Jan 25, 2018 4:54 pm
by hwcltjn
I've just installed a fresh version of 0.9.8-19 on Ubuntu 16 with Apache and NGINX, configured a new web domain, successfully added a Let's Encrypt certificate but when I change the proxy template to "http2" I get an error that NGINX is unable to restart.

Anyone else having the same problem?

Logs indicate:

Code: Select all

2018/01/25 17:38:44 [emerg] 4912#4912: open() "/var/log/httpd/domains/domain.net.error.log" failed (2: No such file or directory)
Manually changing the default.stpl nginx template to include http2 works fine though.

EDIT:
It seems someone has a similar/same issue on github https://github.com/serghey-rodin/vesta/issues/1414

Re: HTTP 2 Failing?

Posted: Thu Jan 25, 2018 5:08 pm
by youradds
I think the problem is that the folder should be:

/var/log/apache2

Maybe try making a symlink?
ln -s /var/log/apache2 /var/log/httpd
Andy

Re: HTTP 2 Failing?

Posted: Fri Jan 26, 2018 4:17 pm
by hwcltjn
Andy, nicely spotted.
I've figured it out.

There's a bug in the http2.tpl and http2.stpl nginx templates located at:

Code: Select all

/usr/local/vesta/data/templates/web/nginx/
As you rightly mentioned the logpaths are hardcoded to /var/log/httpd/domains when they should be /var/log/%web_system%/domains/.

So in http2.tpl and http2.stpl lines 7, 13 and 14 need to modified from

Code: Select all

/var/log/httpd/domains/%domain%
to

Code: Select all

/var/log/%web_system%/domains/%domain%

Re: HTTP 2 Failing?

Posted: Fri Feb 09, 2018 12:04 pm
by benito
Thank you for figuring this out!

Everything is working as expected now.

Re: HTTP 2 Failing?

Posted: Sun Feb 25, 2018 11:22 am
by Vladimir Chanaev
benito wrote:
Fri Feb 09, 2018 12:04 pm
Thank you for figuring this out!

Everything is working as expected now.
It's useless. HTTP/2 in latest VestaCP won't working normally anyway. You may get shiny green tick on the test sites, but I see no profit!

Apache2 needs additional HTTP/2 template too. Vesta don't have it, nor mod_http2 for Apache2 (check «sudo a2enmod http2»).
There is no proper version of Apache2 for HTTP/2 by default in VestaCP (check «sudo apache2 -v»). Apache version 2.4.26 or higher needed for normal functionality (Apache version 2.4.17 only introduced HTTP/2 support, but there are security problems etc., read guides).

Only Nginx version is OK for HTTP/2 (1.9.5 or higher needed).

As of my experiments - enabling HTTP/2 on current VestaCP (with some fixes such above) didn't give any increase in productivity and site speed. Only additional problems, and «shiny green tick» on test sites.

Waiting for proper implementation of this great feature in newest versions of VestaCP. I didn't look the roadmap yet, hope it is in the short list already!

Cheers!

Re: HTTP 2 Failing?

Posted: Sun Feb 25, 2018 12:19 pm
by skamasle
Vladimir Chanaev wrote:
Sun Feb 25, 2018 11:22 am
benito wrote:
Fri Feb 09, 2018 12:04 pm
Thank you for figuring this out!

Everything is working as expected now.
It's useless. HTTP/2 in latest VestaCP won't working normally anyway. You may get shiny green tick on the test sites, but I see no profit!

Apache2 needs additional HTTP/2 template too. Vesta don't have it, nor mod_http2 for Apache2 (check «sudo a2enmod http2»).
There is no proper version of Apache2 for HTTP/2 by default in VestaCP (check «sudo apache2 -v»). Apache version 2.4.26 or higher needed for normal functionality (Apache version 2.4.17 only introduced HTTP/2 support, but there are security problems etc., read guides).

Only Nginx version is OK for HTTP/2 (1.9.5 or higher needed).

As of my experiments - enabling HTTP/2 on current VestaCP (with some fixes such above) didn't give any increase in productivity and site speed. Only additional problems, and «shiny green tick» on test sites.

Waiting for proper implementation of this great feature in newest versions of VestaCP. I didn't look the roadmap yet, hope it is in the short list already!

Cheers!
HTTP2 works fine, in many cases you not need http2 in apache if nginx load all statics contents, js, css, img, so you get speed there loading all static content at once

In my case not see to much diference in sites loaded with apache2 + nginx http2 or apache2 http2 + nginx http2

You speed up your statics content with http2 and you win in most cases a lot of speed, so You will not see to many diferences if implement http2 in apache

You can see many orther system like plesk using the same metod enable http2

SSL is just implemented in nginx so apache cant work with http2 I think this is main reason, and of course you not see any performance in apache because you do too few request to it if nginx load all static, apache get just one or two request,