Field notes

Short notes on running small Linux servers, written down so I stop looking the same things up twice.

Backups you can restore

A backup nobody has restored is a guess. Once a month I copy the archive to a second machine, unpack it there, and start the service from it. Fifteen minutes, and it is the only way to know the dump is good.

Real client addresses behind a proxy

A reverse proxy hides the address of the client unless it forwards it. Forward the header once, from the hop you control, and drop whatever the client sent under the same name. Two proxies appending to one header make the value useless.

Logs before theories

When a service refuses connections, read its own log first. Most outages on a small box are a full disk, a missing permission, or a port that another process already took.