http/2 with ISPConfig

Discussion in 'Installation/Configuration' started by Poliman, Mar 27, 2018.

  1. Poliman

    Poliman Member

    I want turn on support on apache2 for http/2. I have apache 2.4.29 and Ubuntu 16.04 LTS and ISPConfig 3.1.11. I saw in log that mpm_prefork does not support http/2 and there is need to change on mpm_event. I saw https://http2.pro/doc/Apache (btw probably dumb question - how set link in post without visible url?) where author says how to do it but in testing environment (I haven't there any external IP or domain visible on the Internet - it's just VMWare virtual machine on private PC) I did not all commands from tutorial:
    Code:
    a2enconf php7.0-fpm
    systemctl reload apache2
    a2dismod php7.0
    systemctl restart apache2
    a2dismod mpm_prefork
    a2enmod mpm_event
    systemctl restart apache2
    because I have php 7.0.28 which is currently the newest on Ubuntu 16.04 and I dont need install any php7.1. Does anybody know and could say that commands mentioned above won't break ISP?
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    To set a link in post without visible url, you select the word you want to link and use the link button to add its url.

    Plus I think the most important part is this:
    Code:
    a2enmod http2
    apachectl restart
    And this for your vhost:
    Code:
    <VirtualHost *:443>
    ...
    Protocols h2 http/1.1
    ...
    
     
  3. Poliman

    Poliman Member

    I think about some troubleshooting, because it's quite hard to enable it when apache uses mpm_prefork. In apache2 log are lines:
    Code:
    AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive. 
    I tried to enable it but without success from some time until last night. On my own VPS with ISPConfig, I decided to get some risk and I implemented with success http2. I did (in production environment I have Ubuntu 16.04.4 LTS and ISP 3.1.11, php 7.0.28, apache2 2.4.33 but it works also on 2.4.29):
    Code:
    a2enconf php7.0-fpm
    systemctl reload apache2
    a2dismod php7.0
    systemctl restart apache2
    a2dismod mpm_prefork
    a2enmod mpm_event
    systemctl restart apache2
    Above commands resolved issue and in vhost site I added exactly like you wrote @ahrasis :
    Code:
    Protocols h2 http/1.1
     
    Last edited: Mar 28, 2018
    ahrasis likes this.
  4. PatFoo

    PatFoo New Member

    Thanks Poliman and Ahrasis, this worked for me on Debian 9 with ispconfig (latest).
     
    ahrasis likes this.

Share This Page