In recent Ubuntu versions (no idea if this is inherited from Debian or not), the apache user is set in /etc/apache2/envvars, which is processed when Apache is [re]started via /etc/init.d/apache2 [re]start.
However, running apache outside that script will then cause errors. So for example, apache2 -t .. which should test the configuration without restarting, instead generates errors "bad user name" errors because the environment variable relied upon in apache2.conf is not being set.
So, is there a "correct" way to test the configuration?
(The solution I always end up with is editing apache2.conf to set User/Group to www-data directly.)
As an aside, is there any way to make logrotate not kill Apache if there's an error in the apache configuration file?
On Fri, February 26, 2010 11:39 am, Mark Rogers wrote:
So, is there a "correct" way to test the configuration?
sudo apache2ctl configtest
On 26 Feb 11:39, Mark Rogers wrote:
In recent Ubuntu versions (no idea if this is inherited from Debian or not), the apache user is set in /etc/apache2/envvars, which is processed when Apache is [re]started via /etc/init.d/apache2 [re]start.
However, running apache outside that script will then cause errors. So for example, apache2 -t .. which should test the configuration without restarting, instead generates errors "bad user name" errors because the environment variable relied upon in apache2.conf is not being set.
So, is there a "correct" way to test the configuration?
apache2ctl configtest
On 26/02/10 11:43, Brett Parker wrote:
apache2ctl configtest
... and at 11:42, Martin A. Brooks wrote:
sudo apache2ctl configtest
Thanks guys!