Ubuntuでapt-getしたApacheの実行ユーザの変更方法。


Ubuntuで apt-get install したApacheの実行ユーザの変更方法です。

/etc/apache2/apache2.conf を見てみると、

# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

とあるので、

/etc/apache2/envvars

を開いて、

export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data

APACHE_RUN_USER 及び APACHE_RUN_GROUP の値をそれぞれ任意のユーザ及びグループに変更してやるだけです。

スポンサード リンク

公開日:2013年11月25日
タグ:, ,