Overview

This site is a small, production-style deployment on Oracle Cloud Infrastructure. Two web servers share the work behind a load balancer, keep no files that matter on their own disks, and hold no cloud credentials. Each request follows the path below; the server that answered yours is highlighted.

  1. Your browser HTTPS for every page; plain HTTP is redirected
  2. OCI Load Balancer Terminates TLS with a self-renewing Let's Encrypt certificate, balances traffic, health-checks every server
  3. KirkStrongWebServer3 Fault domain 1 VM.Standard.E2.1.Micro KirkStrongWebServer4 Served this page, fault domain 3 VM.Standard.E2.1.Micro
  4. OCI Object Storage Résumé, photos, page content and releases, shared by every server

Infrastructure

The web servers are VM.Standard.E2.1.Micro instances running Oracle Linux Server 8.10. Each is in a different fault domain, so a single hardware failure can't take the site down. They sit in a private subnet with no public IP addresses; the load balancer in the public subnet is the only way in from the internet. The whole environment, from the servers to the load balancer and storage, runs within Oracle's Always Free tier.

Outbound traffic is split by purpose: a NAT gateway for operating system and package updates, and a service gateway for Object Storage, so content traffic never leaves Oracle's network. Security lists allow web traffic to the servers only from the load balancer's subnet.

Hosting several sites

The same servers host several independent websites (2 at the moment). Every request carries the name the visitor typed, and the application uses it to choose the site: its own text, photos, look and administrators, kept in its own folder in Object Storage. Adding a site needs no new servers, only a DNS record, a certificate and a few settings.

Each site has its own HTTPS certificate on its own load balancer listener. The load balancer picks the right one from the name the browser asks for (a feature called SNI, using the load balancer's virtual hostnames), so one site's certificate renewal can never affect another's.

Security

  • No stored credentials. The servers reach Oracle Cloud with Instance Principals. A dynamic group identifies them, and IAM policies limit them to one Object Storage bucket and to installing certificates on the load balancer.
  • Encrypted everywhere. Every page is served over HTTPS. Each site's Let's Encrypt certificate renews itself and is installed on the load balancer automatically. Plain HTTP redirects to HTTPS, and HSTS tells browsers to insist on it.
  • Individual admin accounts. Each person has their own sign-in, as an owner (every site and account) or a site admin (only their own sites). New accounts start with a one-time temporary password, passwords are stored only as salted hashes, and changes record who made them. Sessions last an hour, every form is protected against cross-site request forgery, and repeated failed sign-ins are slowed down.
  • Hardened pages. Every response carries a strict Content Security Policy and related security headers, and edited text is sanitized before it's shown.
  • Private photos. Uploaded photos are re-encoded with all metadata removed, including GPS location.

Application and deployment

On each server, Apache httpd sits in front of a Python Flask application running under Gunicorn as a hardened systemd service. Content is read from Object Storage and briefly cached, so an update made from the admin page on either server appears on both within seconds. Shared records such as the list of sites and accounts are saved with a version check, so the two servers can never overwrite each other's changes.

New versions are published to Object Storage as numbered release packages. Each server pulls the newest release using its own identity and installs it, one server at a time, while the load balancer's health check keeps traffic on whichever server is ready; naming an older release rolls back.