"The achievements on the ground speak for themselves," Assad told soldiers in Daraya, a few miles south of the capital. "Without you we would all be slaves to the countries that want to subjugate us. But the Syrian people will never be slaves. Not in the past, present or future," he said.
The attack in Homs targeted the neighborhoods of Zahra, Akrama and Wadi Dahab, which are all populated mostly by Alawites, the same sect as Assad.
It showed that rebels fighting to oust Assad are still able to strike back despite significant advances by the military that have bolstered the confidence of the regime.
The blasts sent a massive ball of fire and a black mushroom cloud into the sky and caused widespread damage and panic among residents, many of whom are supporters of Assad. Firefighters struggled for two hours to put out the flames.
"The first explosion knocked people off their feet," said one Homs resident, adding that successive smaller explosions lasted for over an hour. He declined to be named, fearing retaliation.
He said the blasts were so strong they cracked the walls of some buildings and blew doors and window frames off their hinges. The slum area of Wadi Dahab houses mostly one- or two-story buildings.
The Britain-based Syrian Observatory for Human Rights, which closely monitors the fighting via a network of activists on the ground, said at least 40 people were killed and 120 were wounded some critically when rockets struck the arms depot in the southern part of Wadi Dahab and ignited the fire.
Activists in the city corroborated that account, saying at least 40 were killed and many others wounded. They said the regime is known to keep arms depots in those areas.
An official at the governor's office in Homs said six people were killed and 145 wounded when about 10 rockets slammed into the neighborhood of Zahra and the nearby sports stadium. He said one rocket struck a civil defense center, referring to the Wadi Dahab area, although he did not directly address the weapons depot.
He spoke on condition of anonymity because he wasn't authorized to release the information.
Government officials often give conflicting figures than those provided by the opposition. There was no immediately explanation for the discrepancy, and state-run media did not report the incident.
The attack was claimed on Facebook by the al-Haq brigade, one of a myriad of groups fighting in Homs that are loosely affiliated with the main rebel umbrella group, the Free Syrian Army. Homs-based activist Abu Bilal also said al-Haq brigade targeted the weapons depot with Grad rockets.
Assad's visit to Daraya was his first known public trip outside the capital, his seat of power, in more than a year. On the previous trip he visited the battered Baba Amr district in Homs after troops seized it from rebels in March 2012.
On Thursday, Syrian TV showed him walking among soldiers in the battered suburb, chatting and shaking hands with soldiers atop tanks who pumped their fists in the air and flashed the victory sign.
"I deliver to you today a message of thanks from every Syrian," he told the troops.
The visit is the latest sign of confidence from Assad, whose troops have been on the offensive and scored significant gains in recent months.
More than 100,000 people have been killed since the uprising against the Assad family's four-decade rule began in March 2011. The revolt later escalated into a civil war, which has uprooted millions of people from their homes.
Daraya was held by rebels for months. It took the army weeks of heavy fighting to regain control of the area earlier this year.
Before his trip to Daraya, Assad lauded his troops' accomplishments in the battle against opposition forces.
"You have stunned the entire world with your steadfastness and ability to overcome the difficulties and score achievements in the face of the fiercest barbaric war the modern history has ever witnessed," he said in comments released for Army Day and carried by the state news agency SANA. "Had we in Syria not been confident of victory, we wouldn't have been able to resist" for more than two years.
In August 2012, activists reported that regime forces went on a dayslong killing spree after they seized Daraya from rebels.
Reports of the death toll ranged from more than 300 people to as many as 600. It was impossible at the time to independently verify the numbers because of severe restrictions on media coverage of the conflict.
The suburb switched hands between rebel forces and troops several times after August until regime forces recaptured it earlier this year.
Assad's comments Thursday followed several major gains against the rebels, mostly in Homs province and near Damascus.
The rebels suffered two major setbacks during a wideranging government offensive in central Syria. In June, Assad's army recaptured the strategic town of Qusair near the Lebanese border. Earlier this week, government troops took control of a district in the city of Homs that had long been an opposition stronghold.
Also Thursday, five major aid agencies warned that the Syrian refugee crisis is stretching aid efforts to their limits.
The agencies including CARE International, Oxfam, Danish Refugee Council, Handicap International and World Vision said they are increasingly concerned that the international response is failing to match the scale of the crisis.
Their joint statement said more than 1.4 million Syrians or 80 percent of all Syrian refugees are now living in tents, temporary settlements, or over-crowded and expensive rented accommodations.