One day, you might want to replace the standard error pages of your HTTP server or K8S cluster with something more original and attractive. That's why this repository was created :) It contains:
- A simple error page generator written in Go
- Single-page error templates (themes) with various designs (located in the templates directory) that you can customize as you wish
- A fast and lightweight HTTP server is available as a single binary file and Docker image. It includes built-in error page templates from this repository. You don't need anything except the compiled binary file or Docker image
- Pre-generated error pages (sources can be found here, and the demo is always accessible here)
🔥 Features List
- HTTP server written in Go, utilizing the extremely fast FastHTTP and in-memory caching
- Respects the
Content-Type
HTTP header (andX-Format
) value, responding with the corresponding format (supported formats:json
,xml
, andplaintext
) - Error pages are configured to be excluded from search engine indexing (using meta tags and HTTP headers) to prevent SEO issues on your website
- HTML content (including CSS, SVG, and JS) is minified on the fly
- Logs written in
json
format - Contains a health check endpoint (
/healthz
) - Consumes very few resources and is suitable for use in resource-constrained environments
- Respects the
- Lightweight Docker image, distroless, and uses an unprivileged user by default
- Go-template tags are allowed in the templates
- Ready for integration with Traefik, [Ingress-nginx][ingress-nginx], and more
- Error pages can be embedded into your own Docker image with
nginx
in a few simple steps - Fully configurable
- Distributed as a Docker image and compiled binary files
- Localized HTML error pages (🇺🇸, 🇫🇷, 🇺🇦, 🇷🇺, 🇵🇹, 🇳🇱, 🇩🇪, 🇪🇸, 🇨🇳, 🇮🇩, 🇵🇱, 🇰🇷) - translation process described here - other translations are welcome!
🧩 Install
Download the latest binary file for your OS/architecture from the releases page or use our Docker image:
Registry | Image |
---|---|
GitHub Container Registry | ghcr.io/tarampampam/error-pages |
Docker Hub (mirror) | tarampampam/error-pages |
[!IMPORTANT] Using the
latest
tag for the Docker image is highly discouraged due to potential backward-incompatible changes during major upgrades. Please use tags in theX.Y.Z
format.
💣 Or you can also download the already rendered error pages pack as a zip or tar.gz archive.
🪂 Templates (themes)
The following templates are built-in and available for use without any additional setup:
[!NOTE] The
cats
template is the only one of those that fetches resources (the actual cat pictures) from external servers - all other templates are self-contained.