3

I'm looking to do some testing with HTTP/2 on Amazon EC2 and am wondering what the quickest way is to set up such a temporary server there.

I was hoping that there would be some ready-to-go AMI images that include HTTP/2 support, but haven't found any yet. I'm preferring either an Apache-based or Nginx-based setup, the flavor of Linux does not matter.

Any thoughts on shortcuts to get a HTTP/2 server running quickly on EC2?

Fer
  • 167

3 Answers3

3

The new version of Amazon Linux AMI (2017.09) was released. As the part of upgrade now AMI linux uses OpenSSL 1.0.2k and HTTP/2 protocol is now supported by AMI’s httpd24 and nginx. You can upgrade your instance by running these two commands

sudo yum clean all
sudo yum update

After that you should reboot your instance and change your webserver's configs to run thru HTTP/2 protocol.

0

Easiest way would be to install and compile from source. Download OpenSSL and NGINX source. After you've compiled OpenSSL, compile NGINX with this flag.

./configure --with-http_ssl_module --with-openssl=/usr/bin/oopenssl-1.0.2j 

(or whatever version of SSL you're using.

https://www.elasticbin.com/amazon-linux-nginx-http2-0/

-1

The most easiest way to setup Apache on an EC2 instance is to configure a script that will download and launch during instance start.

Here is an example:

#!/bin/bash
yum update -y
yum install httpd -y
service httpd start

More detailed instruction about how to do it is here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html