We report the detection of absorption lines by the reactive ions OH<sup>+<sup/>, H<sub>2<sub/>O<sup>+<sup/>and H<sub>3<sub/>O<sup>+<sup/> along the line of sight to the submillimeter continuum source G10.6–0.4 (W31C). We used the <i>Herschel<i/> HIFI instrument in dual beam switch mode to observe the ground state rotational transitions of OH<sup>+<sup/> at 971 GHz, H<sub>2<sub/>O<sup>+<sup/> at 1115 and 607 GHz, and H<sub>3<sub/>O<sup>+<sup/> at 984 GHz. The resultant spectra show deep absorption over a broad velocity range that originates in the interstellar matter along the line of sight to G10.6–0.4 as well as in the molecular gas directly associated with that source. The OH<sup>+<sup/> spectrum reaches saturation over most velocities corresponding to the foreground gas, while the opacity of the H<sub>2<sub/>O<sup>+<sup/> lines remains lower than 1 in the same velocity range, and the H<sub>3<sub/>O<sup>+<sup/>line shows only weak absorption. For LSR velocities between 7 and 50 km s<sup>-1<sup/> we estimate total column densities of <i>N<i/>(OH<sup>+<sup/>) <i>≥<i/> 2.5 × 10<sup>14<sup/> cm<sup>-2<sup/>, <i>N<i/>(H<sub>2<sub/>O<sup>+<sup/>) ~6 × 10<sup>13<sup/> cm<sup>-2<sup/> and <i>N<i/>(H<sub>3<sub/>O<sup>+<sup/>) ~4.0 × 10<sup>13<sup/> cm<sup>-2<sup/>. These detections confirm the role of O<sup>+<sup/> and OH<sup>+<sup/> in initiating the oxygen chemistry in diffuse molecular gas and strengthen our understanding of the gas phase production of water. The high ratio of the OH<sup>+<sup/> by the H<sub>2<sub/>O<sup>+<sup/> column density implies that these species predominantly trace low-density gas with a small fraction of hydrogen in molecular form.