Support for HTTP/2 via mod_http2

Virtualmin needs HTTP/2 support. Virtualmin doesn't provide support for Apache mod_http2 on CentOS 7. Attempting to add support via third party repositories doesn't work either since Apache usually isn't compiled to serve content from /home.

I realized first hand the performance differences between HTTP/2 and HTTP when using TinyTiny RSS on a virtualmin server vs a cpanel server that supports HTTP/2. The performance boost is considerable.

You can see the performance differences yourself by going here: HTTP/2 Demo

Status: 
Active

Comments

Howdy -- thanks for contacting us!

As you saw, we don't offer any HTTP/2 support, as most of the distributions we support don't offer that. We don't provide Apache, that's offered by the various distributions Virtualmin runs on.

As I look into this, It does appear that HTTP/2 can be enabled in Ubuntu 18.04 and Debian 9 though, so we'll start the process of reviewing what needs done to fully support that.

I can't offer an ETA (it may still be a little ways off), but we'll start looking into that.

Note though that it's unlikely we'd ever support it on CentOS 7, but seeing that on other distros that already include support for it is what we'd be targeting.

Joe points out that Nginx has supported HTTP/2 longer than Apache... so while we're unlikely to support HTTP/2 in Apache on CentOS 7, it's plausible that we could at some point support HTTP/2 on Nginx on CentOS 7.

It should be possible with CENTOS and for example this REPO. https://codeit.guru/en_US/2018/08/apache-httpd-2-4-34-2-brotli-alpn-http2-openssl-1-1-0-red-hat-centos-rhel/

But if issues Support Virtualmin???

We'll work on a way to provide HTTP/2 support -- we're just saying we aren't going to provide packages for CentOS 7, most likely.

Once Virtualmin has HTTP/2 support, you could always manually install packages from a repo like that one you mentioned.

DEMO from above HTTP2 <>1

HTTP/2 Latency: 15ms Load time: 6.40s

HTTP/1.1 Latency: 19ms Load time: 4.25s

German INternet provider latest Firefox Windows 10 Pro

Second load:

HTTP/2 Latency: 15ms Load time: 5.95s HTTP/1.1 Latency: 49ms Load time: 8.57s

Here i'm following topics about HTTP2 support but not mean to push... ;)

Is there any update about this? I feel disadvantaged as a web host unable to provide http/2. It’s crazy to think something highly recommended by google and others is not being provided. Thanks.

Wich OS are you on while? Note though that it's unlikely we'd ever support it on CentOS 7, but seeing that on other distros that already include support for it is what we'd be targeting.

You can however switch to unsuported like the codeit guru repo for CENTOS 7

We are running ( only few small sites for over 1.5 years now with that HTTP2 and Virtualmin 6x) Now testing new fresh install virtualmin with again codeit guru repo is still working.

Les BUGS in Virtualmin 6 then back in august 2017 where email and some more was a .... ;) Only a few things now as i wrote here in forum GPL virtualmin and usermin.

I don't know the pollicy for virtualmin for Hosters and online Websites, only that Virtualmin is used for just more then that and therefore i presume having not "always" the newest stuff up todate more edgy things and so on.

It is a choice you have te deal with if using Virtualmin for Hosting! You always can install and change things yourself as SYSADMIN ofcourse and so on. For us the main reason for not using pro version while no support for such third party repo's. sorry guys Therefore i hope you are ok? in exchange i spend some time to write some Dutchy texts here in forum.?

Centos 7

About this though: "Note though that it's unlikely we'd ever support it on CentOS 7"

But why though? Is it not possible to add in even though Centos dont? Its just quite unbelievable to be honest years after http/2 comes out that its not supported. Google recommend it, your site is marked down if you dont have it. Its just highly highly recommended to have in websites.

Because Centos dont provide it means Centos is now no longer recommended for web servers due to missing such important web hosting features.

if you could add it in Virtualmin or provide a process then I think you need to seen as such a recommended feature of web hosting.

I have about 8 Centos servers with hundreds of websites, its not practical for me to just switch to a new distro for all those.

I have seen repos that claim to have it. The problem is I have no idea about the quality of these repos of people behind it, I am reluctant to just go add some strangers repo which installs software on my server. If there was a trustworty well known repo then I think it would be OK.

Is the codeit guru trusted and well known and well used?

"You always can install and change things yourself as SYSADMIN of course and so on" -> um no not really with many servers and hundreds of sites - but yes to new websites. Although its not really the attitude virtualmin should take, telling people to go use an alternative system. Thats a sure way to get your product killed!

Thanks

It's not that we don't want it to work on CentOS 7.

The issue is that the Apache version provided by RHEL/CentOS for CentOS 7 is older than what is needed for HTTP2 to work.

We don't provide the Apache packages -- the Apache package Virtualmin uses is the one provided by RHEL/CentOS (with one minor change, to point the suexec path to /home rather than /var).

Essentially, CentOS 7 is just too old for http2.

Your only real options are --

  1. Talk to the RHEL/CentOS 7 developers, who provide the Apache package for their distro

  2. Wait for CentOS 8

  3. Move to another distro

  4. Build your own Apache package containing the features you need

Each one of the above contains it's own benefits and drawbacks.

Personally, I'd go with #3, moving to another distro, if support for HTTP2 were that important -- but if that's not an option, and HTTP2 is necessary, than exploring one of those other options may be necessary.

For codit don't follow this manual you have to exclude and remove / replace some virtualmin packages if not installed with those excluded repo packages from scratch fresh install virtualmin!

But for trusted their repo is named here https://www.w3school-learn.com/2017/12/how-to-install-latest-apache-serv...

YUP you have to do or the /home in /var or rebuild with that docroot /home

And taking care for excluding in virtualmin repo while update..................

With al that you loose your Virtualmin pro Support i supose . ( partly or???? )

Hi is there any timeline for HTTP/2 support for the operating systems that already have support for that like Ubuntu 18.04? I tried different tutorials activating HTTP/2 support with virtualmin but without any success.

Thanks

It should be possible to enable HTTP2 support in a Linux distribution that has a new enough Apache version.

Just to try it out, I was going to try it on one of my personal servers, and for that I was going to use these instructions here:

https://helgeklein.com/blog/2018/11/enabling-http-2-in-apache-on-ubuntu-...

I haven't tried it yet, but that's the plan at some point in the future.

If you're having trouble with it, my suggestion would be to start a new Forum thread, and there, describe what you've setup so far and what trouble you're seeing.

This point is common to forget if doing so . ;) Switching Apache’s PHP Module from MPM Prefork to Event

I have followed that tutorial but after restarting apache it says something about PHP to be recompiled for mpm-event. I have a multi version install of PHP from add-apt-repository ppa:ondrej/php

If you have any additional questions, it's no problem to get support, but you'd want to do so using the Forums.

We'd encourage you to start a new Forum thread, and getting some input there. Thanks!

About this "the Apache package Virtualmin uses is the one provided by RHEL/CentOS (with one minor change, to point the suexec path to /home rather than /var)." -> can you not use a different repo yourselves, then do the modifications you need to that? Why is virtualmin using a repo with an old version?

If you wont, then I do think a guide is needed for installation and then future upgrade for us to do it, its ridiculous to be stuck with this outdated version.

That's the Apache version that comes with CentOS/RHEL.

If you don't want that Apache version, our recommendation is to use a distro providing your preferred Apache version.

For example, Ubuntu 18.04, which provides much newer package, comes with Apache 2.4.29.

As far as I know HTTP2 is more of a standard now than an option. I would prefer HTTP2 be default and allow downgrading if a user would want to do that.

I think Virtualmin should install with HTTP/2 enabled by default on distros that support HTTP/2 with the standard packages for that release, like Ubuntu 18.04 and later. It is really a necessity these days.

After we release Debian 10 support, we'll be discussing the idea of enabling http2 support, and whether that's something that can be done by default.

I'll say that we've been using http2 successfully with VirtualMin on Ubuntu18.04 since 18.04 came out; though we also swap our PHP to FPM rather than the default thing - if I remember right, that's done in order to get it working at all.

Regards enabling HTTP/2, here is what we currently use for Ubuntu 18.04 with Virtualmin 6.07. No guarantees this will work for you or won't break things, but shared in case it is helpful. We only enable and use PHP-FPM with this configuration.

Disable mod_php since it will not work
  sudo a2dismod php7.2

Disable pre-fork model, enable event module
  sudo a2dismod mpm_prefork
  sudo a2enmod mpm_event

Check config as may need to remove mod_php directives from website configs
  sudo apache2ctl configtest

Restart apache
  sudo service apache2 restart

Run Virtualmin config check to detect that mod_php is gone.
  sudo apache2ctl configtest

But note that due to this bug in virtualmin 6.07:
  https://github.com/virtualmin/virtualmin-gpl/issues/96
the configuration check will break any FPM site by changing the port number of the pools with 'Fixing port clash for PHP-FPM version 7.2.3' messages. You have to go and edit of the files like:
  /etc/php/7.2/fpm/pool.d/12345678901234.conf
to change them back again to match the website config, e.g. 'SetHandler proxy:fcgi://localhost:8000'. This problem will occur again any time you run a check or a scheduled check, or install updates. Check the Github issue for possible patches.

Install the http2 module
  sudo a2enmod http2

Edit /etc/apache2/apache2.conf and add at the bottom:

# Enable HTTP/2 if available
<IfModule http2_module>
        ProtocolsHonorOrder On
        Protocols h2 http/1.1
</IfModule>

Check config and restart
  sudo apache2ctl configtest
  sudo service apache2 restart