This happens if you have have pam_lve or CageFS enabled, and user who restarted Apache last time around logged in as regular user (and got into LVE due to pam_lve), then su or sudo to root. If user restarts Apache after that, Apache will run inside that's user LVE.
To solve that issue, login as root directly, and restart Apache web server.
If sshd server was restarted before by same user -- it will run inside LVE as well, so you would have to restart it via console or by setting up a cron job. Rebooting server should also restart SSH & Apache outside of LVE.
To make sure that the issue doesn't happen again, make sure that user ids of users that have sudo and su priviledges are bellow 500 (or the number specified as minimum uid in /etc/pam.d/sshd for pam_lve)