Preheat the oven to 425°F (Gas 7/220°C). Choose a deep ovenproof dish into which the whole chicken will fit snugly. Line the dish with a double thickness of heavy foil, allowing plenty of excess foil to overhang the top edge of the ovenproof dish.
Truss the chicken tightly so that the salt cannot fall into the cavity. Sprinkle a thin layer of salt in the foil-lined dish then place the chicken on top.
Pour the remaining salt all around and over the top of the chicken until it is completely encased. Sprinkle the top with a. little water.
Cover tightly with the foil and bake the chicken on the lower oven shelf for 1 hours and 45 minutes. Meanwhile, put the onions in a small heavy-based saucepan. Break up the heads of garlic, but leave the skins on. Add to the pan with the olive oil and a little salt and pepper.
Cover and cook over the lowest possible heat for about 1 hour or until the garlic is completely soft.
Plunge the tomatoes into boiling water for 30 seconds, then refresh in cold water. Peel away the skins and quarter. Put the red peppers, tomatoes and chilli in a shallow ovenproof dish and sprinkle with the oil. Bake on the shelf above the chicken for 45 minutes or until the peppers are slightly charred.
Squeeze the garlic out of the skins. Process the onions, garlic and pan juices in a blender or food processor until smooth. Return the puree to the clean saucepan.
To serve the chicken, open out the foil and ease it out of the dish. Place on a large serving platter. Transfer the roasted pepper mixture to a serving dish and garnish with parsley. Reheat the garlic puree. Crack open the salt crust on the chicken and brush away the salt before carving and serving with the garlic puree and pepper mixture.