Equivalences between conformal foliations on Euclidean $3$-space, Hermitian structures on Euclidean $4$-space, shear-free ray congruences on Minkowski $4$-space, and holomorphic foliations on complex $4$-space are explained geometrically and twistorially; these are used to show that 1) any real-analytic complex-valued harmonic morphism without critical points defined on an open subset of Minkowski space is conformally equivalent to the direction vector field of a shear-free ray congruence, 2) the boundary values at infinity of a complex-valued harmonic morphism on hyperbolic $4$-space define a real-analytic conformal foliation by curves of an open subset of Euclidean $3$-space and all such foliations arise this way. This gives an explicit method of finding such foliations; some examples are given.