neither prefork nor worker settings are found in /etc/apache2/apache2.conf - why?

I've just installed Apache 2.4.7 (Ubuntu) on my Ubuntu 14.04 LTS system and can't see neither prefork nor worker settings in the /etc/apache2/apache2.conf. They are also not defined for default virtual host. Should I set them myself in apache2.conf like this?

<IfModule mpm_prefork_module>
    StartServers 2
    MinSpareServers 2
    MaxSpareServers 5
    MaxClients 200 #must be customized
    ServerLimit 200 #must be customized
    MaxRequestsPerChild 100
</IfModule>

Solution 1:

Ubuntu 14 organizes all the module-specific configs in separate files under /etc/apache2/mods-available/, so the MPM prefork stuff is now located in /etc/apache2/mods-available/mpm_prefork.conf

Solution 2:

Have you looked for these settings within /etc/apache2/conf.d/? It's likely that these settings are kept in separate included files to aid with packaging.

Should I set them myself in apache2.conf like this?

<IfModule mpm_prefork_module>
    StartServers 2
    MinSpareServers 2
    MaxSpareServers 5
    MaxClients 200 #must be customized
    ServerLimit 200 #must be customized
    MaxRequestsPerChild 100
</IfModule>

Yes, you can place them in apache2.conf (though do look for them in other files in conf.d/ as mentioned above).

Your MaxRequestsPerChild seems very low - this can be in the thousands.

If you are running mod_php your MaxClients should be lowered significantly, unless you have many gigs of RAM.