Use a different user/group to run Apache (Ubuntu)
If you check your /etc/apache2/apache2.conf
and look for User
and Group
:
# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
Let’s replace User and Group variable in /etc/apache2/envvars
.
export APACHE_RUN_USER=user-you-want-to-use
export APACHE_RUN_GROUP=user-you-want-to-use
Restart Apache.
sudo service apache2 restart
And you are done!