Rock Island, Illinois was also a military prison camp during the Civil War. Online records for the Confederate dead may be found at http://www.rootsweb.com/~ilrockis/cemetery/confed .htm. information about the prisoner includes name and rank, regiment, date of death, and grave number.
Alton Federal Military Prison was also located in Illinois. Records of Confederate soldiers housed there include name, rank, company, state, date of capture, place of capture, date of death, cause of death, and place of burial. Records for this prison may be found at http://www.altonweb.com/history/civilwar/confed/in dex.html.
Andersonville Military Prison was a dreaded Confederate prison that housed prisoners of the North. The prison was located at Andersonville in Sumpter County, Georgia. Records for Andersonville prison may be searched at http://www.itd.nps.gov/cwss/prisoners.htm
Numerous places in Richmond, Virginia housed prisoners during the civil War. Numerous links to those sites (some with photographs) can be found athttp://www.itd.nps.gov/cwss/prisoners.htm. Libby Prison, one of the most famous military prisons of the Confederacy is located in Richmond, Virginia.
Information for Point Lookout Military Prison in Maryland can be found here http://www.plpow.com/Search.htm
These are by no means the only records available online or by query. If doing a query, send as much information as you know about the person in question. At the very least send first and last name, and what unit the person was with, if you know that information. One good place to find out information about a soldier's unit is the Civil War Soldiers and Sailors System located at Civil War Soldiers and Sailors System Name Search.
To search for possible online records if you know what prison your ancestor may have been in, just enter the name of the prison into one of the large search engines and you are sure to get numerous returns. Don't forget to try different variants on your search terms to see what hits are returned.
Civil War ancestor research can be a very rewarding endeavor and many interesting stories will emerge in the process. The most difficult part is learning to use the vast resources available to you.