The scanning near-field optical microscope (SNOM) breaks the diffraction limit of the conventional optical microscope. It has promising applications in the fields of material science, biological engineering, and semiconductor physics, say a few. A versatile SNOM, which can operate in illumination mode, collection mode and frustration total internal reflection (TIR) mode, was developed. Several kinds of samples including holographic grating, liposome and powder of BaCO3 were investigated. Images with an optical resolution of 100 nm were obtained.