Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a question regarding dynamically loadable modules. Say I have 2 virtual hosts, and I used <LoadModule> in only one of them. Will that module not be loaded on the second virtual host?

I am trying to understand where does the DSO (Dynamic Shared Objects) advantage come into effect. If the module is loaded in the primary server level scope, it seems like there is no reason to not use statically binding. Am I right?

share|improve this question
up vote 0 down vote accepted

You are loading the module into the Apache process, not into a specific virtual host. The "LoadModule" directive can only be used in the "server config" (think "global") context, and affects every process spawned by the first Apache process.

The primary advantages to using DSOs are (a) you can add additional modules without having to rebuild Apache, and (b) you can load only those modules that you are actually using, which may slightly cut down on Apache's memory footprint. Distributors like DSOs because they can make all features available in a modular fashion. If you're building your own Apache AND you have a stable set of requirements, there's no reason not to build everything statically. You may even get slightly faster startup times, since there's no dynamic binding going on, but this usually isn't relevant (since Apache tends to be a long-lived process, the startup time isn't terribly important).

share|improve this answer
Thanks lot for the answer. Sure clarified things for me! Just one last thing as for the loading process. The loading itself is done only on startup, right? It is not loaded for every new process.. – Joel Dec 9 '10 at 21:08
That's correct. – larsks Dec 9 '10 at 21:18

Your Answer


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.