http2 in nginx template

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

  1. zenny

    zenny Member


    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 Active Member

    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:
    ssl{tmpl_if name='enable_http2' op='==' value='y'} http2{/tmpl_if}
    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

    Is it a way to help a ISPCONFIG user ?
    Strange !

Share This Page