Stromal cells generate a complex cellular scaffold that provides specialized microenvironments for lymphocyte activation in secondary lymphoid organs. Here, we assessed whether local activation of stromal cells in the central nervous system (CNS) is mandatory to transfer immune recognition from secondary lymphoid organs into the infected tissue. We report that neurotropic virus infection in mice triggered the establishment of such stromal cell niches in the CNS. CNS stromal cell activation was dominated by a rapid and vigorous production of CC-motif chemokine receptor (CCR) 7 ligands CCL19 and CCL21 by vascular endothelial cells and adjacent fibroblastic reticular cell (FRC)-like cells in the perivascular space. Moreover, CCR7 ligands produced by CNS stromal cells were crucial to support recruitment and local re-activation of antiviral CD8(+) T cells and to protect the host from lethal neuroinflammatory disease, indicating that CNS stromal cells generate confined microenvironments that control protective T cell immunity.