Small Nginx-based reverse proxy for the Vernissage platform. It exposes one public host and routes each request either to the Vernissage Server API or the Vernissage Web client.
The proxy is intentionally simple: routing is based on request path and headers so browser traffic reaches the web app, while API, federation, and machine-readable requests reach the backend.
- Project website: joinvernissage.org
- Documentation: docs.joinvernissage.org
- API server: VernissageServer
- Web client: VernissageWeb
- iOS client: VernissageMobile
- Single-entry reverse proxy for the Vernissage stack
- Header-based routing for API and machine-readable requests
- Path-based routing for API and federated endpoints
- Docker-friendly deployment with a minimal Nginx image
- Current configuration tailored for Fly.io private networking
The routing logic lives in nginx.conf.
| Request match | Target | Notes |
|---|---|---|
/api/v1/* |
backend | Main Vernissage API |
/.well-known/* |
backend | Federated discovery endpoints such as WebFinger |
/rss/* |
backend | Feed endpoints |
/atom/* |
backend | Feed endpoints |
Accept or Content-Type contains json |
backend | Case-insensitive match, applies outside the explicit API paths too |
| everything else | frontend | Regular browser traffic goes to Vernissage Web |
In practice:
GET /api/v1/timelines/homealways goes to the APIGET /.well-known/webfingeralways goes to the APIGET /withAccept: application/jsongoes to the APIGET /from a normal browser request goes to the web client
The committed configuration expects two internal upstream services:
vernissage-api.internal:8080asbackendvernissage-web.internal:8080asfrontend
For every proxied request, Nginx forwards request headers and preserves:
HostX-Forwarded-Host
This setup is designed for deployments where the API and web app are already running behind private service discovery and the proxy becomes the single public entrypoint.
nginx.conf- reverse proxy rules and upstream selectionDockerfile- minimal Nginx container imagefly.toml- Fly.io app configuration
This repository does not contain the API or web application itself. To test the proxy locally, run the related projects first:
- API: usually on
http://localhost:8080 - Web: usually on
http://localhost:4200
Then adapt nginx.conf for local upstream addresses, for example:
- change
vernissage-api.internal:8080tohost.docker.internal:8080or another reachable API host - change
vernissage-web.internal:8080tohost.docker.internal:4200or another reachable web host
Build and run the proxy image:
docker build -t vernissage-proxy .
docker run --rm -p 8081:8080 vernissage-proxyThen open http://localhost:8081.
The recommended production form is a Docker image built from this repository.
The current Nginx config is Fly.io-oriented:
- it resolves private
.internalservices, - it uses the Fly resolver at
[fdaa::3], fly.tomlcontains the runtime settings for deployment.
If you deploy outside Fly.io, update the upstream hostnames and, if needed, the resolver configuration.
Contributions are welcome.
- Keep routing changes small and explicit.
- Validate that API requests, browser requests, and federation endpoints still reach the correct upstream.
- Document any new routing rules in this README.
This project is licensed under the Apache License 2.0.