I would like to know how to start up k=10 Apache2 server processes upon Ubuntu 16.04 alpha release reboot. Yesterday, I read this URL, [https://rudd-o.com/linux-and-free-software/tuning-an-apache-server-in-5-minutes], which says to use Apache2 with the prefork.c module and set StartServers equal to 10
<IfModule prefork.c> StartServers 4 MinSpareServers 3 MaxSpareServers 10 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 10000 </IfModule>
Unfortunately , my apache2 only has the event.c module. I tried upgrading apache2 to the prefork.c module with sudo apt-get install apache-mtm-prefork and the install error said no such package available because it may be outdated or obsolete. Then I tried sudo apt-get update and I received the same error message.
My next step was to try to configure the apache2 event module with StartServers = 5 by changing /etc/httpd.conf and then restarting my systemd apache.service file and my ps -ef | grep -in "apache2" shows only 2 www-data apache2 processes and ps-ef | grep -in "mod" shows no mod-mono-server4 process.
Furthermore, upon running apache2 at the bash shell command prompt it said syntax error APACHE2_LOCK_FILE environment variable missing. I discovered that APACHE2_LOCK_FILE is defined in my /etc/apache2/envvars file.
The Ubuntu 16.04 apache2 man page says, "In general, apache2 should not be invoked directly, but rather should be invoked via /etc/init.d/apache2 or apache2ctl. The default Debian configuration requires environment variables that are defined in /etc/apache2/envvars and are not available if apache2 is started directly. However, apache2ctl can be used to pass arbitrary arguments to apache2."
So I could use /etc/apache2/envars , I edited my systemd apache.service file to use ExecStart = /etc/init.d/apache2 start and rebooted my Lenovo ThinkStation Ubuntu 16.04 desktop and to no avail, I still got only 2 www-data apache2 processes and ps-ef | grep -in "mod" shows no mod-mono-server4 process when I ran ps -ef | grep -in "apache2".
May I ask what I did wrong and how to fix it? Please suggest tests I can do.
I know that many Ubuntu 16.04 alpha release users will soon complain about the same problem I experienced.