Re: Running Apache in Single Process Mode for Docker Container?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 25, 2015 at 7:26 PM, David Aronchick <aronchick@xxxxxxxxx> 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

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux