Autonomous sailboats are good candidates for long term oceanic surveys, since they use wind power as their main mean of propulsion. Controlling a sailboat, however, is typically not an easy task due to the high variability in the wind and the side drift of the boat. In this paper, we describe how we design and set up the control architecture that allows Aeolus, the autonomous model sailboat of ETH Zurich, to sail upwind and execute fast and smooth tack maneuvers. Different controllers to actuate the rudder have been implemented and validated for both the upwind sailing and the tack maneuver. We present experimental results obtained during several autonomous sailing tests at the lake Zurich.