  We present a study of the environment of the Swift long gamma-ray burst GRB
120327A at z ~2.8 through optical spectroscopy of its afterglow. We analyzed
medium-resolution, multi-epoch spectroscopic observations (~7000 - 12000,
corresponding to ~ 15 - 23 km/s, S/N = 15- 30 and wavelength range
3000-25000AA) of the optical afterglow of GRB 120327A, taken with X-shooter at
the VLT 2.13 and 27.65 hr after the GRB trigger. The first epoch spectrum shows
that the ISM in the GRB host galaxy at z = 2.8145 is extremely rich in
absorption features, with three components contributing to the line profiles.
The hydrogen column density associated with GRB 120327A has log NH / cm^(-2) =
22.01 +/- 0.09, and the metallicity of the host galaxy is in the range [X/H] =
-1.3 to -1.1. In addition to the ground state lines, we detect absorption
features associated with excited states of CII, OI, SiII, FeII, and NiII, which
we used to derive information on the distance between the host absorbing gas
and the site of the GRB explosion. The variability of the FeI\lambda2396
excited line between the two epochs proves that these features are excited by
the GRB UV flux. Moreover, the distance of component I is found to be
dI=200+100-60 pc, while component II is located closer to the GRB, at
dII=100+40-30 pc. These values are among the lowest found in GRBs. Component
III does not show excited transitions, so it should be located farther away
from the GRB. The presence of H2 molecules is firmly established, with a
molecular fraction in the range f=4 X 10^(-7) - 10^(-4). This particularly low
value can be attributed to the small dust content. This represents the third
positive detection of molecules in a GRB environment.
