Virasoro algebra from modular Hamiltonians