Preheat the oven to 350 degrees F. Place the chicken in a large bowl and lightly coat with salt, pepper, and cayenne. Crush half of the garlic cloves with the back of a heavy knife. Leave the remaining cloves whole.
Heat ½ cup of the oil in a roasting pan large enough to hold the chicken in one layer, over 2 burners over medium-high heat. Add the chicken and sear on both sides. Add the crushed garlic and cook, stirring, until fragrant, about 1 minute. Remove from the heat and add the remaining ingredients, stirring well to evenly distribute.
Cover the pan tightly and roast for 1 hour. Uncover and roast until the chicken is brown and tender, and the garlic is caramelized, about 30 minutes, basting occasionally.
Remove from the oven. Transfer the chicken to a platter and sprinkle with the parsley. Spoon the pan juices over the chicken, or serve on the side.
Bring a large pot of salted water to a boil. Add the spaghetti and cook until al dente, about 10 minutes. Drain in a colander.
Meanwhile, in a medium pot, heat the oil over medium heat. Add the garlic and green onions and cook, stirring, until fragrant and starting to turn golden, about 2 minutes. Add the wine, basil, oregano, thyme, salt, and pepper, and cook for 2 minutes. Add the butter and parsley and cook for 2 minutes.
Return the drained spaghetti to the pot. Add the sauce, to taste, and toss well to coat. Place in a large serving bowl and coat with the Parmesan.