Feedback control of nonaxisymmetric resistive wall modes is studied analytically for cylindrical plasmas and computationally for high beta tokamaks. Internal poloidal sensors give superior performance to radial sensors, for instance in terms of the highest achievable plasma pressure. A single poloidal array of feedback coils allows robust control with respect to variations in plasma pressure, current and rotation velocity. The control analysis is applied to advanced scenarios for ITER. Configurations with multiple poloidal coils and feedback systems for nonresonant MHD instabilities in reversed field pinches are also studied. The control study was carried out using the assumption of ideal amplifiers.