httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Aronchick <>
Subject Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?
Date Mon, 26 Oct 2015 03:17:15 GMT
Thanks for all the help all! I dug into the apachectl and realized I was
using the config file in sites-enabled, instead of the top level
/etc/apache2/apache.conf file. The latter file installs all the modules in
/mods-enabled, which is what was missing. (for the curious, I also had to
copy all the env vars into a Dockerfile so that the binary executed with
the right environment variables set)

So the net is, the following command now starts apache2 correctly:

/usr/sbin/apache2 -DFOREGROUND -DNO_DETACH -f /etc/apache2/apache2.conf

However, it still seems to spin up three threads, which I can't figure out
why. Thanks again all!

On Sun, Oct 25, 2015 at 7:52 PM, Kurtis Rader <> wrote:

> On Sun, Oct 25, 2015 at 7:26 PM, David Aronchick <>
> wrote:
>> Thank you, this is very helpful! Is there any way to get an output of all
>> the items on the command line ultimately used by apachectl? For example,
>> when I do the following, it fails - I assume I'm missing something.
>> $ source /etc/apache2/envvars
>> $ /usr/sbin/apache2 -f /etc/apache2/sites-available/rails.conf  -DFOREGROUND -DNO_DETACH
>> AH00534: apache2: Configuration error: No MPM loaded.
> As Eric Covener pointed out you probably have a "envvars" file that
> contains additional environment variables your Apache HTTP server
> configuration expects to be defined. For example, on my Mac OS X server the
> HomeBrew installed apachectl script includes these statements:
> if test -f /usr/local/Cellar/httpd24/2.4.16/bin/envvars; then
>   . /usr/local/Cellar/httpd24/2.4.16/bin/envvars
> fi
> If you're unfamiliar with UNIX shell scripting that says that if the file
> exists assume it contains shell commands and run them in the context of the
> current shell. This is most often done as a way to set so-called
> "environment" variables that are inherited by subsequent processes;
> including the Apache HTTP server.
> Take a look at your apachectl script for the equivalent block of code then
> look at the contents of the file it refers to. You'll want to ensure you
> have set and exported the same variables. Probably the easiest way is to
> run the same "." (dot or "source") command before invoking the httpd binary.
> --
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank

View raw message