nginx :: online

The reverse proxy is up and forwarding nothing. No upstream is bound to this hostname yet, which is why every request lands on this default response.

[ pid 1247 | workers 4 | uptime 00:42:08 | conn 0 | rps 0.0 ]

Configuration files live in /etc/nginx/. Reload with nginx -s reload after editing.


// stack

Listener bound on 0.0.0.0:80. SSL listener inactive until a certificate is wired up. HTTP/2 will activate automatically once you switch listen 443 ssl on. HTTP/3 requires explicit opt-in plus a QUIC-capable build.

// add an upstream

  1. Define upstream app { server 127.0.0.1:3000; } at the http level.
  2. Add location / inside a server block with proxy_pass http://app;.
  3. Optionally set proxy_set_header Host $host; to forward the original Host header.
  4. Reload nginx and watch error.log for connect failures.
For long-running websocket upstreams, also set proxy_http_version 1.1 and forward the Upgrade and Connection headers.

// useful tuning knobs

// diagnostics

Run curl -I http://localhost/ from the box itself to confirm the daemon answers locally. If that works but external requests still fail, the firewall or the cloud provider's security group is the next thing to check.

Docs: nginx.org/en/docs

# end of default response