Brindisi Airport (Salento Airport): This is the sensible airport: Ceglie is roughly a 45–55-minute drive away. Rent a car at the airport (typically €35–80 a day before fuel/insurance, season-dependent) or pre-book a driver; do not count on finding a taxi rank solution for the return. The cheap fallback is airport bus into Brindisi, then STP/local connections including line 370; allow about 2½ hours and roughly €3–4, with timetables too fragile for a late arrival.
Bari Karol Wojtyła Airport: Use Bari only if the flight is substantially better. A hire car takes about 1 hour 20 minutes. Public transport means the 17-minute airport train to Bari Centrale, then a Ferrovie del Sud Est service via Martina Franca to Ceglie; it is a roughly 3-hour, connection-dependent trip and not a clever choice with luggage. Budget around €8–12 for the rail route.
Brindisi railway station: For a car-free arrival, this is the most useful mainline gateway: take a Trenitalia regional train toward Francavilla Fontana, then connect to Ferrovie del Sud Est for Ceglie Messapica. In a good connection it is about 1½ hours; plan 2 hours or more because services are not frequent. Expect roughly €5–8 total. Ceglie station is walkable from the historic centre, but not from most countryside masserie.
Ceglie Messapica railway station: The station is on the Ferrovie del Sud Est network, useful for the Martina Franca/Francavilla Fontana corridor rather than for high-speed Italy. Check the actual-day FSE timetable rather than assuming a train exists: substitutions and sparse frequencies are part of the deal.