Configuring HTTP/2 with Apache on Fedora

HTTP/2 is the new version of the well known HTTP protocol which has been at the venerable 1.1 since late last century. Version 2 was derived out of Google’s SPDY protocol and it’s a binary protocol over the text based 1.1. It introduces a bunch of improvements including reducing latency, multiplexing, and server push. There’s some useful improvements that will be great for things like apps that use WebSockets. The Apache httpd daemon has included complete support for HTTP/2 since the 2.4.17 release in the form of mod_http2.

First you should configure your site with SSL, I suggest using LetsEncrypt/certbot as documented in this Fedora Magazine article.

Then you need to make sure the module is loaded, at least in Fedora 25 this is enabled in /etc/httpd/conf.modules.d/00-base.conf by default:

LoadModule http2_module modules/mod_http2.so

Then you just need to enable the protocol in either the general configuration or in specific VirtualHost directives for specific sites:

# for a https server
Protocols h2 http/1.1

# for a http server
Protocols h2c http/1.1

Then it’s just a systemctl restart httpd to make the changes take effect.

To test whether you’re serving over HTTP/2 you can test using this HTTP/2 testing site or with the OpenSSL client (check for “ALPN protocol: h2” in the output) with the following command:

openssl s_client -alpn h2 -connect HOSTNAME:443

Note: HTTP/2 is not currently supported in the httpd shipped in RHEL.

Getting IoT kick started on Fedora

So a number of people have been discussing the Internet of Things on Fedora for some time. We now have a Fedora IoT mailing list where these discussions can be more centralised and directed.

So where and how do we get started here? I’m going to kick start some ideas here and repost it as a mail to the list so we can use it as a basis to start the discussion.

As I outlined in my Using Fedora as a base for the IoT revolution talk at Flock there’s a lot of use cases and components that make up a complete IoT stack. I think initially we should focus on two initial goals rather than biting off too much:

  • A IoT internet gateway device
  • A IoT sensors endpoint device

The general idea here is that both of the above would be a very minimal shared build, likely using atomic images to enable easy update/rollback with some specific components for each use case. Initially I suggest we focus on a single, or maybe a couple, of specific devices to limit the scope to something more achievable and to add features as we go.

IoT internet gateway device specs and features

  • Wired and/or wireless ethernet to provide internet connectivity
  • Bluetooth Smart (AKA LE)
  • Thread Stack support (6LoWPAN and friends)
  • 802.15.4 support
  • MQTT Broker support (not standard for a IoT GW but enables easier localised testing)
  • MQTT Client
  • Atomic support: updates, rollback etc
  • Works with both our endpoint below and other IoT OSes such as Contiki

IoT internet sensors endpoint specs and features

  • Wired or wireless ethernet IP support
  • Bluetooth Smart (AKA LE)
  • Equivalent to Thread Stack support (6LoWPAN and friends)
  • MQTT Broker support (not standard for a IoT GW but enables easier testing
  • MQTT Client
  • CoAP client
  • Atomic support: updates, rollback etc
  • Support for various inputs and outputs and sensors

I have no doubt missed a lot of details in the above use cases, it’s somewhere to start. I think we also need to look at tools like Node-RED and tools for managing the devices. IoT is a big topic, the idea is we need to get the conversation start somewhere. I’ll look forward to seeing you all on the list to do that.

FUDCon Tempe

Well its not long before I’ll be jumping on a plane to head over the pond to Tempe, Arizona to the latest and greatest FUDCon. This will be my forth FUDCon event. I always enjoy them. Its lots of fun catching up with friends and fellow contributors who’ll no doubt become friends. There’s always one thing I really don’t like about FUDCon…. its that there’s always too many awesome topics of discussion and sessions that I want to attend but they conflict with other sessions that I want to go to 🙂

So what do I want to discuss and see discussed at FUDCon Tempe? Well as per usual there’s lots so here’s a quick bullet list:

  • Fedora Mobility: How to take it forward and who wants to achieve what, and how we all go about it. As devices get smaller and every company and their dog release tablets I think mobile devices will become more key to Fedora. It also fits in very well with a number of the Fedora Board Long Term Goals in particular I think it fits well for the help people control their content and devices and the Access from anywhere strategy.
  • Sugar, OLPC and Sugar on a Stick: there’s going to be quite a few people from various OLPC and Sugar projects in attendance. Also the awesome adamw and the Fedora QA team is going to be there so there’s plans to extend the discussions we started at FUDCon Zurich. The OLPC project is arguably the largest deployment of devices based on Fedora. The OLPC OS that runs on their XO laptops is pretty close to a vanilla Fedora release and as the last of the XO kernel patches make it upstream you can run vanilla Fedora on them with few issues.
  • Fedora ARM and secondary architectures: dgilmore, ctyler, PaulW will (I think) all be there and Fedora ARM is really starting to amp up with their awesome work! This also crosses over somewhat into OLPC and is hand in hand with Fedora Mobility. I suspect the discussions will revolve around getting Fedora 14 and rawhide building, ARMv7 + hardfp builds and ensuring ARM becomes a solid secondary arch.
  • Cloud: This sort of stuff is part of what I do for my $dayjob and it interests me greatly! I just wish I had more time to contribute to the SIG.
  • MeeGo Netbook UX: yes, this was a big FAIL for Fedora 14 and I need to blog on this. Looking much better for Fedora 15. Watch this space!
  • IPv6. There’s been some interesting posts on using IPv6 with various ISPs with that other Linux based desktop OS. Why isn’t there the same for Fedora??
  • Friends: One of the big ones of the four F’s of Fedora.
  • There’s always lots of random hallway discussions.

There’s no doubt a number of things that I’ve missed. The other thought I have is what of my Mobility tech toys to bring along. I have my laptop obviously. My atom based netbook running MeeGo Netbook UX on rawhide, my XO 1.5 running Fedora 14, my Toshiba AC100 running Fedora ARM 13 but I don’t think I can pack 4 laptop/netbook devices 😛