Question on www-data for Apach2

Please forgive the question if it has already been answered. We are in an eternal migration process to a new server and are tightening up everything as we move each site. I usually run 'atop' all day while at my desk and the APACHE2 command shows www-data as the users. It also shows that for <awstats.pl>. Is there a way for a site to actually use the admin user account or something that allows me to see which sites are calling that Apache request? Thanks.

Status: 
Closed (fixed)

Comments

Howdy -- the Apache process would indeed show "www-data" as the user.

However, whenever PHP code is executed, the php process should show the actual Virtual Server owner.

Is there anyway to change it so the apache2 would show the user or virtual server of the account?

Well, the Apache process itself always does run as the "www-data" user.

Anything Apache does that's not executing a script -- such as retrieving HTML, CSS, images, JavaScript -- that all is done as the www-data user, not as the Virtual Server owner.

There isn't really a way to change that.

Whenever a script is running -- PHP, Perl, Python, and such -- those scripts are executed using suexec, and that's done as the Virtual Server owner. So when it's a script, it's executed as the individual user... when it's static content, retrieving that is performed as the www-data user.

Thank you for the clarification. Always a big help.