The town of Andover, Massachusetts, was experiencing their own witch trials. The people of the town overthrew the courts and started a riot. They were not going to allow innocent people to be hung, and they stood up against the court system. Danforth is afraid this is going to happen in Salem, if John Proctor and Rebecca Nurse are hung.
"I tell you what is said here, sir: Andover have thrown out the court, they say, and will have no part of witchcraft. There be a faction here, feeding on that news, and I tell you true, sir, I fear there will be a riot here."
All of this comes to light in Act 4. Danforth is really pushing for John Proctor and Rebecca Nurse to confess to witchcraft so they won't be hung, and he will look like the victor. He doesn't care that they are innocent, all he cares about is that he looks like he has won to battle against the devil. Danforth is so afraid the people of Salem are going to see him for what he really is, and begin to riot, just like they did in Andover. He will go to any means necessary to prevent this from happening.
The people in the nearby town of Andover, Massachusetts revolted against the court for the witch trials. Just like in Salem, people were falsely accused of witchcraft and were imprisoned. The people in Andover, however, rebelled against the court. They felt that the accusations were false and that the court was a fraud. Judge Danforth fears that happening in Salem. He is afraid that the people of Salem are getting fed up with the trials and are beginning to think that the accusations are all made up. He doesn't want to made to look foolish so he is anxious for John Proctor to "confess" so that a popular citizen like Proctor can be saved from the gallows with his confession, however fake that confession may be.