I'm having some trouble understanding session timeouts in regards to Magento/Apache/PHP. We are converting from IIS/ASP. Initially I set the timeout in the admin, System->Configuration->Web->Session Cookie Management->Cookie Lifetime to 20 minutes. That is working fine, but I noticed that the session does not terminate when the browser is closed. So I set Cookie Lifetime to 0, which ends the session when the browser closes, but now it doesn't after a span of inactivity.
I was thinking that PHP would take care of it since it has the default of 24 minutes. But maybe I need to do something in Apache as well. Seems like we adjusted IIS and ASP before.
Anyway my goal is to have the Magento session end on browser close and after 20 or so minutes. What settings or combinations of settings do I need?