Getting started with NGINX Plus in the Amazon Elastic Compute Cloud (EC2) is easy! We provide multiple supported instances of NGINX Plus (based on Amazon Linux, RedHat Linux, and Ubuntu) at the Amazon Web Services (AWS) Marketplace, both available either as a free trial or on a pay‑by‑use basis.
Amazon’s Getting Started guide gives you a quick introduction to the process of launching AMI instances, though it’s really as simple as ‘Subscribe’ and ‘Launch’. The NGINX Plus on AWS whitepaper from AWS provides a detailed description.
When you launch a new instance, NGINX Plus starts automatically and is configured to serve a default index.html page. Use the control panel to determine the public DNS name for the instance and access it using a web browser:
Troubleshooting – Security Groups
If the connection times out and you don’t see the default web page, it’s most likely that the EC2 security group that was assigned to the instance does not permit HTTP traffic. You can create a new security group that admits HTTP (port 80) and HTTPS (port 443) traffic from all sources, and locks down SSH so it’s only accessible from your IP address:
Now apply the group to your NGINX Plus instance:
Checking the Status of the Running Instance
Now, connect to the instance using SSH and check the status of NGINX Plus:
[email protected]$ chmod 400 aws_cert.pem [email protected]$ ssh -i aws_cert.pem [email protected] ... [email protected]:~$ /etc/init.d/nginx status * nginx is running
Installing Additional NGINX Plus modules
The AMIs are preinstalled with the standard nginx-plus package. It includes the core modules from the open source NGINX product and a number of extensions to improve load balancing, media delivery, caching, and management.
The source code for NGINX Plus is not available. If you want to use some of the more popular third‑party modules with NGINX Plus, they can be installed from our modules repository.
Your NGINX Plus support contract covers only the functionality created and certified by NGINX, Inc. Some third‑party modules are provided for convenience, and are not covered by NGINX support.
Enabling High Availability
NGINX Plus with Amazon ELB
ELB functions as a Layer 7 HTTP proxy (much like NGINX Plus). If you want to determine the true source IP address of a client connection that is forwarded to NGINX Plus, you can inspect the
X-Forwarded-For header that is added by ELB, using the Real IP module in NGINX Plus.
If you plan to deliver applications over HTTP/2 or using WebSocket, then you need to know that ELB does not terminate HTTP/2 traffic or forward WebSocket connections. In this case, you need to configure ELB to perform TCP load balancing (rather than HTTP/HTTPS) and use the PROXY Protocol to forward source IP addresses.
Editor – The previous paragraph originally referred to SPDY, which was the technology available at the time of publication and formed the basis for HTTP/2.
For more information, see NGINX Plus and Amazon Elastic Load Balancing on AWS.
NGINX Plus with Route 53
Our deployment guide, Global Server Load Balancing with Amazon Route 53 and NGINX Plus, explains step‑by‑step how to configure all components – Route 53 for GSLB, NGINX Plus to load balance traffic in each region, and NGINX or NGINX Plus to serve domain content from the regions.