This information was gathered for an Ubuntu 10.04 machine, but should be relevant to any xorg.con file
To make the external display rotate, open the /etc/X11/Xorg.conf file in your favorite editor.
Go to the “Monitor” section (to the monitor you want to rotate and add the following lines at the end of the section:
Option "Rotate" "CCW"
Use CCW for Counter Clockwise, and use CW for Clockwise.
When you are finished, safe the file and restart the X server (or just reboot your computer).