Ubuntu – Unable to restart Apache, getting error: apache2: bad user name ${APACHE_RUN_USER}


I am getting this error trying to restart Apache, does anyone know how to fix this?

Best Answer

  • To fix this problem, you have to make the changes to two separate files.

    First, edit /etc/apache2/apache2.conf, adding these lines:

    User www-data
    Group www-data

    Second, edit /etc/apache2/envvars, adding these lines:

    export APACHE_RUN_USER=www-data
    export APACHE_RUN_GROUP=www-data
  • Related Question