The interaction between light and acoustic phonons is strongly modified in sub-wavelength confinement, and has led to the demonstration and control of Brillouin scattering in photonic structures such as nano-scale optical waveguides and cavities. Besides the small optical mode volume, two physical mechanisms come into play simultaneously: a volume effect caused by the strain-induced refractive index perturbation (known as photo-elasticity), and a surface effect caused by the shift of the optical boundaries due to mechanical vibrations. As a result, proper material and structure engineering allows one to control each contribution individually. Here, we experimentally demonstrate the perfect cancellation of Brillouin scattering arising from Rayleigh acoustic waves by engineering a silica nanowire with exactly opposing photo-elastic and moving-boundary effects. This demonstration provides clear experimental evidence that the interplay between the two mechanisms is a promising tool to precisely control the photon–phonon interaction, enhancing or suppressing it.