Ajax, who finished second in the Dutch Eredivisie last season, will play the first leg at home on July 26 or 27.
The return leg takes place a week later. The two clubs also met each other in the 2010 play-offs. Then the first leg ended in a 1-1 draw.
The return match in Greece was also a draw, but with three away goals, Ajax went through.
The draw for the group stage, in which PSV Eindhoven feature, takes place on August 25.
In the Europa League, Heracles will meet Arouca of Portugal and AZ of Alkmaar will meet Giannina of Greece or Norwegian side Odd in the third qualifying round.