In this paper, we investigate the optimal location of secondary sources (controls) to enhance the reduction of the noise field in a one-dimensional acoustic cavity. We first formulate the active control strategy as a linear quadratic tracking (LQT) problem in a Hilbert space, and then formulate the optimization problem as minimizing an appropriate performance criterion based on the LQT cost function with respect to the location of the controls. A numerical scheme based on the Legendre-tau method is used to approximate the control and the optimization problems. Numerical examples are presented to illustrate the effect of location of controls on the reduction of the noise field.