Shawn Mervin

nginx

A fast web server and reverse proxy that sits in front of the application.

Visit nginx.orgServers and delivery

What it is

nginx is a web server, reverse proxy and load balancer. Igor Sysoev wrote it to handle many simultaneous connections efficiently, using an event-driven design instead of a process or thread per connection. It is now owned by F5, and the open-source version remains freely available and is one of the most widely used web servers on the internet.

It is commonly placed in front of application servers to terminate TLS, serve static files, route requests to the right service and buffer slow clients. Its configuration is short and declarative, which makes a setup easy to read and review. It is a common front door for containerized apps on a single server.

How I use it

  • Fronts Lend Pilot's Docker Compose stack on EC2: the Node and Express API and the web app.
  • Terminates TLS on the origin with Let's Encrypt certificates.
  • Sits behind CloudFront, which gives each lender's own domain a managed certificate at the edge.

nginx is the right tool in front of containerized apps: it handles TLS and static files and passes the rest to the application. I use it on Lend Pilot because it keeps the Node API focused on business logic and gives one clear place for certificates and routing.

Questions

nginx or Apache?

I run both. Apache serves the Rental Pilot API and the company websites, and nginx fronts Lend Pilot's containers. The choice usually follows what the application already runs on.

Who handles TLS certificates?

On Lend Pilot, nginx uses Let's Encrypt on the origin, and CloudFront handles each lender's domain at the edge with a managed certificate.

Working with nginx?

Tell me what you're building. Start a project or see the whole stack.

Got an operation that's outgrown its spreadsheets?

Tell me what your business does and where it's jamming up. If I'm not the right person for it, I'll say so and point you somewhere better.

What to send, and what happens next