Apache child process execution User and group change
You can change the execution user and group of Apache child processes by setting "APACHE_RUN_USER" and "APACHE_RUN_GROUP" in "envvars" of the Apache configuration file.
Apache itself runs with root privileges, but for security reasons, the child process that actually receives the request runs under the specified user. The items that specify the execution user and execution group of this child process are the "APACHE_RUN_USER" and "APACHE_RUN_GROUP" environment variables.
cd / etc / apache2 sudo vi envvars
This is an example of setting the execution user and group of Apache child processes to the application user. By default, there is a group with the same name to which only individual users belong, so specify it.
export APACHE_RUN_USER = myapp export APACHE_RUN_GROUP = myapp