Skip to main content

Reverse Proxy Setup

This tutorial shows how to use ZyveraWeb's reverse proxy to forward requests to an external service.

Scenario

You have a web application running on port 3000 (e.g., a Node.js app, a Python Flask app, or a PHP site) and you want to serve it through ZyveraWeb under a specific domain.

Step 1: Configure the Proxy

Edit config.yml:

sites:
  - domain: "app.example.com"
    proxy: "http://localhost:3000"

Step 2: Restart

/zyveraweb server restart

Step 3: Test

curl http://app.example.com:8080/some/path

This forwards to http://localhost:3000/some/path.

Real-World Examples

Proxying a Minecraft Server Web Map

sites:
  - domain: "map.example.com"
    proxy: "http://localhost:8100"

Proxying a Discord Bot Dashboard

sites:
  - domain: "dashboard.example.com"
    proxy: "http://localhost:4567"

Multiple Proxied Services

sites:
  - domain: "example.com"
    dir: "site/main"

  - domain: "api.example.com"
    proxy: "http://localhost:4000"

  - domain: "grafana.example.com"
    proxy: "http://localhost:3001"

  - domain: "jenkins.example.com"
    proxy: "http://localhost:8080"

Important Notes

  • The upstream server must be reachable from the Minecraft server process.
  • The proxy forwards the request path and query string exactly as received.
  • The Host header is replaced with the upstream's host.
  • X-Forwarded-* headers are added so the upstream knows the original client IP and protocol.
  • WebSocket and other upgrade-based protocols are not supported.