We have investigated the middle atmospheric response to the 27-day and 11-yr solar UV flux variations at low to middle latitudes using a two-dimensional photochemical model, The model reproduced most features of the observed 27-day sensitivity and phase lag of the profile ozone response in the upper stratosphere and lower mesosphere, with a maximum sensitivity of +0.51% per 1% change in 205 nm flux. The model also reproduced the observed transition to a negative phase lag above 2 mb, reflecting the increasing importance with height of the solar modulated HOx, chemistry on the ozone response above 45 km. The model revealed the general anti-correlation of ozone and solar UV at 65-75 km, and simulated strong UV responses of water vapor and HO, species in the mesosphere. Consistent with previous 1D model studies, the observed upper mesospheric positive ozone response averaged over +/-40 degrees was simulated only when the model water vapor concentrations above 75 km were significantly reduced relative to current observations. Including the observed temperature-UV response in the model to account for temperature-chemistry feedback improved the model agreement with observations in the middle mesosphere, but did not improve the overall agreement above 75 km or in the stratosphere for all time periods considered. Consistent with the short photochemical time scales in the upper stratosphere, the model computed ozone-UV sensitivity was similar for the 27-day and 11-yr variations in this region. However, unlike the 27-day variation, the model simulation of the 11-yr solar cycle revealed a positive ozone-UV response throughout the mesosphere due to the large depletion of water vapor and reduced HOx-UV sensitivity. A small negative ozone response at 65-75 km was obtained in the 11-yr simulation when temperature-chemistry feedback was included. In agreement with observations, the model computed a low to middle latitude total ozone phase lag of +3 days and a sensitivity of +0.077% per 1% change in 205 nm flux for the 27-day solar variation, and a total ozone sensitivity of +0.27% for the 11-yr solar cycle. This factor of 3 sensitivity difference is indicative of the photochemical time constant for ozone in the lower stratosphere which is comparable to the 27-day solar rotation period but is much shorter than the 11-yr solar cycle.