Announcement

Collapse
No announcement yet.

How to enable http2

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to enable http2

    Hi all,

    I know that IW supports http2 since Version 6.0.9, but how do I enable it? Any pointers? We are running Centos 7.

    Cheers
    Michael

  • #2
    Hi Michael

    Hope your well and business is good

    It is already enabled or should be

    As a test, google http2 test online and check a website on server

    Many thanks and hope that helps a little

    John

    Comment


    • #3
      Hi Michael

      I hope you don't mind, but to save you time, this site will test for http2 https://http2.pro/

      There are many other sites though

      Also, if you login to nodeworx, server, webserver, looking at modules, you should see http2 enabled and http enabled. Http2 I think only works over https

      I hope that helps a little

      Many thanks

      John
      Attached Files

      Comment


      • #4
        Hi John,

        I did one of those tests and when it failed, I googled a bit and then I came here :)

        Unfortunately I don't have the http2_module installed. So that would have been part of an IW update? Or did I miss something?

        Cheers,
        Michael

        Comment


        • #5
          Hi Michael

          Many thanks

          Please what IW version are you running and what centos 7 version

          I guess IW maybe running RC version so Iíll post my versions to see if we can narrow it further

          Hope thatís alright

          Many thanks

          John

          Comment


          • #6
            Hi Michael

            Please see our centos versions as below

            Many thanks

            John

            InterWorx Version 6.1.26-1600

            Distribution CentOS Linux release 7.5.1804 (Core)

            Comment


            • #7
              Hi Michael

              just on of chance, could you try this, but if IW-CP is stable version, I would update to IW RC version and see if it has enabled http2 first

              Many thanks

              John

              Enable HTTP/2 module
              Apache's HTTP/2 support comes from the mod_http2 module. Enable it from:
              a2enmod http2
              apachectl restart
              If above commands do not work in your system (which is likely the case in CentOS/RHEL), use LoadModule directive in httpd configuration directory to enable http2 module.
              Add HTTP/2 Support
              We highly recommend you enable HTTPS support for your web site first. Most web browser simply do not support HTTP/2 over plain text. Besides, there are no excuses to not use HTTPS anymore. HTTP/2 can be enabled site-by-site basis. Locate your web site's Apache virtual host configuration file, and add the following right after the opening <VirtualHost> tag:
              Protocols h2 http/1.1
              Overall, your configuration file should look something like this:
              <VirtualHost *:443>
              Protocols h2 http/1.1
              ServerAdmin you@your-awesome-site.com
              ServerName your-awesome-site.com
              ...
              </VirtualHost>
              After the changes, don't forget to reload/restart Apache.
              apachectl restart

              Comment


              • #8
                Hi John,

                our versions are exactly the same as yours and we're on RC. Will look into the httpd conf now...

                Comment


                • #9
                  hmm, the 10-http2.conf is there, as well as a correct 00-mpm.conf and which is set to prefork. Switching that to Worker and restarting apache loads http2_module but the http/2 test still faills :(

                  Comment


                  • #10
                    John, do you have that line Protocols h2 http/1.1 in your config files? If so which one?

                    Comment


                    • #11
                      Hi Michael

                      Ah sounds like your getting there

                      That line is actually in http.conf (easily looked at from webserver, edit) and appears as:

                      # Unknown protocols are ignored by Apache, h2 can stay even if
                      # the http2 module is not loaded. See conf.modules.d/10-http2.conf
                      Protocols h2 http/1.1

                      so no, the line does not appear in vhost configs.

                      Which file did you change to workers from prefork, as mpm changed and as far as I remember, does not allow preforking any longer

                      Many thanks

                      John

                      Comment


                      • #12
                        Hi Michael

                        Sorry and apologies in advance for a silly suggestion/question

                        Do you have a proper domain installed on server to test with (if so, could you let me know it privately)

                        The reason I ask is because I have jsut checked, and if using server FQDN, them http2 reports failed. If using proper domain as created as a siteworx account, http2 passes (but you may need a proper SSL from lets ecrypt) eg server FQDN muserver.url, so you try testing using https://muserver.url or https://muserver.url:2443/nodeworx will fail. create muserver.url as a siteworx account, create SSL by LE, test as https://muserver.url and test passes

                        I hope that makes sense and its just a thought incase your chasing a ghost

                        Many thanks

                        John

                        Comment


                        • #13
                          Hi John,

                          I don't have that line in my http.conf

                          So that would be the reason it doesn't work. Adding it and restarting Apache makes http2 work! (This also answers the domain question )

                          But the question is, why is it not there, i.e. why is our http.conf not the iW standard (I never touched it!)?

                          Cheers

                          Michael

                          Comment


                          • #14
                            Oh, and the other question would be: Why was the MP module set to prefork instead of worker by default? Or what MPM do you have?

                            Comment


                            • #15
                              Hi Michael

                              Excellent news. Kudos to you

                              I will email you the mpm conf later this afternoon if alright and I have not altered any conf files, so Iím not sure why yours was different.

                              I may try a clean install test to see if anything has reverted on last update (does happen rarely as the build may link to an earlier revision), so you may have found a bug perhaps

                              Thinking though, as a test, could you revert the mpm conf file back to original and restart apache then test

                              It may have just been the missing line in http.conf that was stopping the module from starting, as apache needs to server both http and http2

                              Hope thatís alright

                              Many thanks

                              John

                              Comment

                              Working...
                              X