Quasi-phase-matching allows one to arbitrarily phase match a single interaction by periodic modulation of the material nonlinear coefficient. A partial extension is obtained by Fibonacci-based quasi-periodic modulation of the nonlinear coefficient. These Fibonacci-based structures allow for simultaneously phase matching two interactions, provided that their wavevector mismatch ratio obeys selection rules, which are governed by the golden ratio τ = (1 + √5)/2. In this paper, we present a novel method for simultaneously phase matching any two nonlinear interactions by general quasi-periodic modulation of the nonlinear coefficient. These quasi-periodic structures, which also include the Fibonacci-based structures as a subgroup, provide greater design flexibility. Our method can be useful for various nonlinear devices, such as multiple-peak frequency doublers, frequency triplers, and frequency quadruplers. We show for two specific devices that similar efficiency, compared to a cascaded device, can be obtained. Furthermore, in contrast to some cascaded devices, these structures can be used in doublepass and standing-wave configurations, since they operate with the same efficiency in both directions of propagation.