Coleraine picked up their first home win of the season thanks to a Neil McCafferty double.
The midfielder drew the Bannsiders level on 23 minutes after Andy McGrory had put the Lurgan Blues in front with only eight minutes gone.
But just before the hour mark McCafferty fired in from the spot after Parkhill had been brought down by McNally.
The Bannsiders should have edged in front on seven minutes when the unmarked Gary Browne headed wide of the target from six yards out.
They were made to pay for that as Glenavon took the lead a minute later, Andy Kilmartin playing in Andy McGrory and he coolly volleyed past Michael Doherty.
Oran Kearney’s men responded with Ogilby and Browne combining again on 11 minutes, the striker hit the target this time round, but it was an easy save for Alan Blayney.
The equaliser finally arrived on 23 minutes as Neil McCafferty’s speculative effort from the edge of the box beat Alan Blayney thanks to a deflection from Conor Dillon.
The Bannsiders were dominating and were unlucky not to go in front just after the half hour. Adam Mullan crossed for Browne and Blayney did well to tip his header on to the post, McCauley picked up the rebound and teed up Parkhill, his shot was blocked but found McGinty and Blayney produced a terrific save to deny him from close range.
Coleraine started the second half in determined fashion with Gary Browne going close twice in the opening 10 minutes.
And they were rewarded for their efforts on 57 minutes as Parkhill was upended in the box by McNally. Neil McCafferty stepped up and fired home from the spot.
Neat interplay by McCauley and McGinty saw the latter teed up the big man just inside the box, but he shot straight at Blayney on 61 minutes.
Gary Hamilton entered the fray and he almost drew the sides level in spectacular fashion with 15 minutes to go. He latched on to Ogilby’s poor header but his overhead kick just went wide of the post.
The visitors though never looked like grabbing an equaliser as Coleraine stood firm.
Coleraine: Doherty, Canning, Mullan, Douglas, Ogilby, McGinty, McCafferty, Harkin, Browne, McCauley, Parkhill.
Subs: Hegarty, Watt, Miskimmin, Kane, Lyons.
Goals: McCafferty (23, 56).
Glenavon: Blayney, McKeown, Singleton, Dillon, McNally, Caldwell, Kilmartin, McCabe, McGrory, Braniff, Forsyth.
Subs: Neill, Hamilton, Bradley, Marshall, Martyn.
Booking: Caldwell, Singleton
Goal: McGrory (8).
Referee: T Marshall (Irvinestown).