About £2.2m will be used to improve existing sections of a popular walking and cycling trail.