Sunan Ibn Majah, Book 1, Hadith 52 (Ibn Majah 318)

It was narrated that Abu Ayyub Ansari said:

"The Messenger of Allah forbade the person who went to the Gha'it to face the Qiblah. He said: 'face towards the east or the west.'"