Medy Elito set Dagenham on their way from the penalty spot and although Claude Davis equalised for Rotherham, Davis gave away the free-kick on the edge of the Rotherham penalty that brought the winner.
The set-piece was pulled back across the box and Luke Wilkinson fired home with eight minutes remaining.
"It was a tough, tough game. It's a difficult place to come to," he said. "I watched Rotherham on Tuesday against Oxford and they were very, very good.
"They have some very good players and we knew it was going to be tough. We got the penalty, but I thought it was going to be another one of those days when Rotherham equalised, but the boys stuck in their in a very tough game.
"We knew that Rotherham counter very quickly and get players forward very quickly so we felt if we sat someone in front of the back four we could counter it, but as the first half went on they mounted lots and lots of pressure and they were just coming and coming and we felt that if we didn't change it, the inevitable would happen.
"So we changed it and we went from one in front of the back four to one in front of the midfield four. We have worked hard in training this week and it was nice to see one of our set pieces come off.
"We changed it because we did feel they were getting on top and it came off."