Where was the capital of the Confederacy in the US Civil War?

Richmond, Virgina. However when the Confederacy was first created, Montgomery, Alabama, became the capitol on February 4th, 1861. However, Virginia Joined the Confederacy, and the capitol was moved to Richmond on May 23rd, 1861 by provisional Confederate President Jefferson Davis, where it remained until it came under Federal control, at which point the Confederate government relocated to Danville, VA in 1865 under pressure of the encroaching Northern army.