Where Apache base modules are located?
When I type apache2ctl - l
I get the following list of modules currently compiled into the server:
core.c
mod_so.c
mod_watchdog.c
http_core.c
mod_log_config.c
mod_logio.c
mod_version.c
mod_unixd.c
but I can't find them anywhere.
I tried sudo find / -name 'core.c'
- nothing.
I also looked in /usr/lib/apache2/modules
-nothing there as well.
OS: Ubuntu Server 20.04 LTS
Where can I find those modules?
Solution 1:
You can't find these modules because they're compiled into the server. That is, they're literally part of the main httpd
or apache2
binary instead of being separate module files.
(The packager can choose to compile any modules they want directly into the server. However, some are compiled-in unconditionally; e.g. mod_so can't ever be a separate module file because it is actually the module loader.)
But besides that, only source code files use the .c
extension; actual compiled modules use .so
(which is a bit like Windows .dll
). For example, the mod_rewrite module would be "mod_rewrite.so
".