i came across a apache httpd 2.2 configuration recently in which multiple ServerRoot-directives were defined, each followed by individual prefork Settings.

Sort of like this:

ServerRoot root1
<IfModule prefork.c>
StartServers          5
MinSpareServers       5
MaxSpareServers      10
MaxClients          150
MaxRequestsPerChild   0


ServerRoot root2
<IfModule prefork.c>
StartServers         10
MinSpareServers      10
MaxSpareServers      20
MaxClients          250
MaxRequestsPerChild   0


In my understanding these are global settings one overriding the other. But is that true and is it still true with the second ServerRoot directive between the prefork blocks?

Thank you in advance


They are not in different conditional blocks and both server roots are used in that way that files with relative paths to both are correctly included.

I just wondered if a <ServerRoot> would initiate a new scope in which all global statements would not override the configuration of previous ones.

  • As far as I know (Apache 2.2) ServerRoot is not valid as a a block definition (there is no way to define a scope with it like <ServerRoot /xyz>) - Within a given scope ServerRoot should override all previous invocations/instances of that directive... – voretaq7 Oct 4 '12 at 21:07

That would only make sense if they're in separate conditional blocks, like an <IfModule>. The last defined ServerRoot is in use, right?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.