Debianのapache2 -Sとか-MとかでBadなエラー

ヴァーチャルな環境を確認しようとapache2 -Sなんてやってみたら下記のようなエラー

# apache2 -S
apache2: bad user name ${APACHE_RUN_USER}

なんじゃこりゃ。

# find /etc/apache2 -type f |xargs grep APACHE_RUN_USER
/etc/apache2/envvars:export APACHE_RUN_USER=www-data
/etc/apache2/apache2.conf:User ${APACHE_RUN_USER}

あー、 /etc/apache2/envvarsに変数があるのね。でも、イチイチexportするのあれだから、ひとまずapache2.confのUserとGroupを修正。

# vi /etc/apache2/apache2.conf
User www-data
Group www-data

でリスタート

# apache2 -S

問題無い様子。