If the processes are running from a terminal or some other visible window, then it's entirely possible that when the window closes, the background process gets terminated.
When I log out, however, it seems to me that the server stops running...but that confuses me, because technically Apache is running as a Unix background process...and I thought all processes of that type continue to run whether you are logged in or out. But it seems that when I log out, those processes are getting killed. Anyone know why, or how I can get them to continue running indefinitely?
I'm not sure about sleep, but when you hibernate a Linux machine, the processes get suspended, and then when you boot the computer up again they are completely restored, with the state of all of their variables intact. Most programs continue running perfectly well. (Of course, the clock has changed, so if you have a time-based program it might mess up.)
Another question: Would it be a good idea to tell my computer never to go to sleep? What's the status of background processes like Apache when the computer goes to sleep? I assume all processes are suspended...and so if I want my server to be running overnight and such, I should not allow my computer to go to sleep.