Like miniature suns, a dozen hissing clouds of burning gas flare inside the closed universe of Cabgoc, a domain of tropical African bush, petroleum-laden Atlantic coastal waters and adventurous American oilmen who are prospering amid turmoil.

Cabgoc, as the Cabinda Gulf Oil Co. is known locally, is an unusual operation, to put it mildly.

Deep in a rain forest to the north, beyond the lurid orange glow that the gas flares cast into a night sky, are scattered and ineffectual bands of rebels who would like to take over all of this 2,800-square-mile enclave and its 193 oil wells. They have killed a few foreign oilmen who have been imprudent enough to try to drive through the forest, but they have left alone the Americans cloistered in the Cabgoc compound.

To the south are camped about 2,000 well-armed Cuban soldiers, part of an expeditionary force that is protecting the revolutionary, Soviet-supported government of Angola and, indirectly, the oil fields here. The Cubans also steer clear of the Americans, who rarely if ever see them.

In between, on the 93-mile coastal strip, lies the Gulf Oil operation. It is an exercise in pragmatism that has survived Portuguese colonial rule, civil war and African revolution here in Cabinda. It is an operation that will pour $1.5 billion in revenues into the Angolan treasury this year, and much of that cash is believed to find its way back to the Soviet Union and Cuba to pay for Angola's war effort.

It is an odd marriage of convenience that satisfies both sides. The only economic enterprise that functions well in a war-devastated, chaotic economy, Cabinda represents Park Place and Boardwalk rolled up into one for this potentially wealthy but increasingly impoverished former Portuguese colony.

The Gulf connection also provides the only sustained contact between Angola and the United States, which do not have diplomatic relations and are on opposite sides of most political issues.

"The word you hear around here is pragmatic," said Jack B. Agan, a bluff, affable Californian who is Cabgoc's deputy director. Angolan officials "are completely businesslike in their dealings with us, and they know what they want. And the banks will tell you that they pay their bills."

"We are interested in efficiency, and this operation works well," echoed Lopo do Nascimento, Angola's minister of planning. State ownership "is not the important thing. What is important is for the government to oversee this enterprise and let the people do their work. We have enough problems without taking on another big one" like running Cabgoc.

Despite a publicly stated commitment to Marxist-Leninist ideology by the ruling Popular Movement for the Liberation of Angola, Angola's constitution guarantees private ownership of property, and its laws on foreign investment are designed to attract it.

Nascimento denied that the government pays the salaries of the Cuban soldiers, saying their presence "represents a form of free aid."

Angola, he asserted, pays only for the housing and food for the expeditionary force, estimated by western governments to number 25,000 men. Western intelligence agencies assert that the Cubans are paid a wage by Angola.

The image of Cuban "internationalists" guarding Gulf Oil "capitalists" at Cabinda is vivid but misleading. The self-contained compound where about 150 Americans, 170 Portuguese and nearly 500 Angolans work is guarded most of the time by two Angolan policemen and a company watchman.

The enclave's 80,000 inhabitants are separated from the Angolan mainland by territory belonging to Zaire, where the Zaire River meets the Atlantic. Its economy is totally dependent on Cabgoc, which is under pressure from the Angolan government to accelerate an already active training and placement program for Angolan nationals.

Gulf has been producing oil here since 1968, initially under the sponsorship of Portugal's colonial dictatorship. The American company suspended operations briefly in 1975 when rival African factions, aided by outside powers, fought a civil war. Gulf quickly came to terms in 1976 with the victorious Popular Movement for the Liberation of Angola (MPLA) -- which had been opposed by the United States.

That accord was not the formal operating agreement that oil companies usually work under in foreign countries, but was little more than a handshake that has held up remarkably well, Agan said.

Rebels operating under the banner of the Front for the Liberation of the Enclave of Cabinda fought against the Portuguese and made several attempts in the civil war to detach the zone from Angola. But the MPLA quickly established a strong military presence in the enclave, chased the remnants of the Cabinda group back into the rain forests and brought in the Cubans.

Gulf's implicit strategy of having no visible security as its security, and thus keeping Angolan and Cuban troops out of the compound, seemed well suited to the sleepy atmosphere of Cabinda until this summer, when the guerrilla group headed by Jonas Savimbi bombed an unguarded section of the 25-mile long pipeline, causing the company to lose about 30,000 barrels of oil, 20 percent of one day's output.

The attack has been followed by escalating threats of violence against the American company from Savimbi's National Union for the Total Independence of Angola, which has been praised by President Reagan for its anticommunism and which is supported logistically by South Africa.

American business, led by Gulf, is becoming more involved. Extensive purchases by Angola of U.S. food products, aircraft and other goods have made the United States Angola's largest trading partner. Since 1982, Angolan oil exports to the United States have doubled and now account for half of Angola's exports.

The U.S. Export-Import Bank has extended a $100 million concessionary loan for projects that Gulf and the Angolan government are jointly undertaking in the Cabinda oil fields as part of a $1 billion, five-year expansion program that will boost Cabgoc's average annual production from its present 155,000 barrels per day to 200,000.

The Angolan government shares 51 percent in costs and investments with Gulf, and owns 51 percent of the oil produced. Two years ago, Cabgoc's production was only 78,000 barrels a day. The oil glut has not impeded expansion, Agan explained, because Angola, not a member of the Organization of Petroleum Exporting Countries, sells at a lower price.