We measure localized and extended mode profiles at the band edge of slow-light photonic-crystal waveguides using phase-sensitive near-field microscopy. High-resolution band structures are obtained and interpreted, allowing the retrieval of the optical density of states (DOS). This constitutes a first observation of the DOS of a periodic system with weak disorder. The Van Hove singularity in the DOS expected at the band edge of an ideal 1D periodic structure is removed by the disorder. The Anderson-localized states form a tail in the density of states, as predicted by Lifshitz for solid-state systems.