1

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
</IfModule>

[vhost-configs]


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

[vhost-configs]

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

EDIT

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.

Finn
  • 11
  • 2
  • 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 ``) - Within a given scope `ServerRoot` should override all previous invocations/instances of that directive... – voretaq7 Oct 04 '12 at 21:07

1 Answers1

0

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

Shane Madden
  • 112,982
  • 12
  • 174
  • 248