For the wave equation with spatially varying wave propagation speed coefficient, output feedback stabilization by boundary control is considered. Controllers and an observer are designed through the backstepping method to achieve exponential stabilization of the closed-loop system.