Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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