A real-space study of a cylindrical integrated optical microcavity by means of a photon scanning-tunneling microscope with a resolution of 50 nm reveals optical intensity distributions in great detail. Moreover, novel phenomena such as polarization conversion and conversion from copropagation to counterpropagation are observed. We present detailed maps of the optical field distribution of the whispering-gallery modes inside the microcavity as a function of both wavelength and position. We have made a quantitative comparison between measured and calculated field distributions. As a result, the buildup of the various whispering-gallery modes is better understood.