Let p, q be chosen as in Schnorr's protocol, and let $g_1, g_2, h$ be elements in $Z^*_P$ of order q.
Assume that the prover P gets as input $w_1,w_2$ where $h = (g_1^{w_1}g_2^{w_2}) \mod q$.
Consider the following protocol:
a) P chooses $r_1,r_2$ at random in $Z_q$ and sends $a = (g_1^{r_1}g_2^{r_2}) \mod q$ to V .
b) V chooses a challenge e at random in $[0,2^t-1]$ and sends it to P.
Here, t is fixed such that $2^t < q$.
c) P sends $z_1 = (r_1 + e*w_1) \mod q$, and $z_2 = (r_2 + e*w_2) \mod q$ to V , who checks that $g_1^{z_1}g_2^{z_2} = (a*h^e) \mod q$, that p and q are prime and that $g_1, g_2$ and h have order q, and accepts iff this is the case.
I need to prove that this is a Sigma-protocol for the relation $h = g_1^{w_1}g_2^{w_2}$ (in the description of the relation, it is understood that it should also be satisfied that p and q are prime, $w_1,w_2$ are in $Z_q$, and that $g_1, g_2$ and $h$ are in $Z^*_p$ and have order q).