I am using Ubuntu server and when I run ps aux
I get the following process table http://pastebin.com/NJsASBek as we can see apache proceess are shown like this:
www-data 26487 0.0 0.9 245476 14920 ? Sl 17:32 0:00 /usr/sbin/apache2 -k start
Where 2687 is the PID. How can I know wich of my enabled sites belong that process?
This is how my apache sites are defined http://pastebin.com/mcew79sH of course I am willing to edit my apache sites if needed.
The default MPM is prefork
, which creates (as you've seen) a pre-forked Apache process that is waiting for a connection to serve a request. It does not fire off different processes for different VirtualHost
declarations, so any given process could serve any of your sites.
As processes are restarted after a configurable number of requests have been served (or an idle timer passes, and the forks are cleaned up), it's possible that any given process has served pages from multiple VirtualHosts
.
External links referenced by this document: