Submitted by rjrsinc on Thu, 01/10/2013 - 15:44 Pro Licensee
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
Submitted by andreychek on Thu, 01/10/2013 - 16:00 Comment #1
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.
Submitted by rjrsinc on Thu, 01/10/2013 - 16:07 Pro Licensee Comment #2
Is there anyway to change it so the apache2 would show the user or virtual server of the account?
Submitted by andreychek on Thu, 01/10/2013 - 16:16 Comment #3
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.
Submitted by rjrsinc on Thu, 01/10/2013 - 16:38 Pro Licensee Comment #4
Thank you for the clarification. Always a big help.