http2 in nginx template

Discussion in 'General' started by zenny, Mar 20, 2017.

  1. zenny

    zenny Member

    Hi,

    I had a look at /usr/local/ispconfig/server/conf/nginx_vhost.conf.master file where there is a provision to enable http2:

    but 'enable http2' is nowhere specified in the ispconfig > sites > add site.

    Also checked Server Config >> Web >> SSL Settings, but there was only checkbox for spdy, not http2.

    How can one enable http2 globally for all sites in ISPconfig3? Thanks!
     
    Last edited: Mar 20, 2017
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you try the spdy checkbox? http2 is the successor of spdy.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Create a custom vhost template in conf-custom folder.
     
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    1. Copy default
    /usr/local/ispconfig/server/conf/nginx_vhost.conf.master to
    /usr/local/ispconfig/server/conf-custom/nginx_vhost.conf.master (might need to create the conf-custom directory first).

    2. Then edit the copied / custom vhost template and remove the if condition surrounding http2 in i.e. From:
    Code:
    ssl{tmpl_if name='enable_http2' op='==' value='y'} http2{/tmpl_if}
    To:
    Code:
    ssl http2
     
  5. itsolon

    itsolon Member

    ahrasis is right, its good to do it by yourself because the if logic does not work as "programmed"
    its simply ignored. to do it by yourself hardcoded works.
    but i still have problems with template engine for nginx. for that reason i switched over to vestacp.
    there are preconfigured nginx templates for many cms, and shops included.
    the only thing is, that they do not have such a smart migration solution when you come from plesk.
    you have to do it manually there ..
    this circumstance makes ispconfig for many users first choice ..
    i need to use map directives and so on and thats not possible with the built in logic for creating nginx vhost templates ..
    this can be done better with VestaCP where you have full power for every chosen template.
    Best regards Markus
     
  6. ilia

    ilia New Member

    Hi,
    Is it a way to help a ISPCONFIG user ?
    Strange !
     
  7. skrb_x

    skrb_x New Member

    VestaCP, that panel with a DDoS exploit which caused thousands servers to be locked weeks ago?
     
  8. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Just to remind that the above suggested template edit and customization is no longer needed since ISPConfig 3.1.12 already added support for http2 by default. Simply head to System > Server Config > Web Tab > SSL Settings and check the box next to Makes SPDY/HTTP2 available. ;)
     
  9. florian030

    florian030 Well-Known Member HowtoForge Supporter

    You can always enabled HTTP2 (nginx and apache). If the webserver does not support http2, this will not be written into the vhost.
     
    ahrasis likes this.

Share This Page