TheNobleSix TheNobleSix - 1 year ago 144
Apache Configuration Question

How to load a complete library in Apache2.4

I created a custom module for Apache2.4 that uses an external library (MagickWand). I installed it using

sudo apt-get install libmagickwand-dev
, but now, what I have to do in order to use it with Apache2.4? When I restart the apache2 service I got the undefined symbol error about a function on MagickWand.
I read that I should load the shared object of the library, but how can I create it? Using apxs? Where?

Thank you very much in advance!

Answer Source

there are two config files in apache2 that you will need to modify:

(for linux)

in the /etc/apache2 there are sub directories of interest:

./mods-available and ./mods-enabled and ./conf-available and ./conf-enabled

The ./mods-available directory contains ALL the loadable modules, all with the .load extension on their file name

The ./mods-enabled directory contains links to the loadable modules in the ./mods-available directory that are to be loaded and links to the .conf file for each of the .conf files (for the individual loadable modules) that are actually to be loaded.

the ./conf-available directory contains all the .conf files for the loadable modules

The ./conf-enabled directory contains links to the files in the ./conf-available directory for the loadable modules configurations that will be actually used

Then in the /etc/apache2 directory is the file apache2.conf that can contain (amongst other things) these two statements:

IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

This is what directs apache2 to actually load modules and their related conf files

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download