Question

I am currently trying to load a module to Apache, build using cmake. The module is called mod_mapcache. It is built successfully and installed correctly in /usr/lib/apache2/modules directroy.

I am using Ubuntu. So I created a new file called mapcache in /etc/apache2/conf.d folder. And wrote

LoadModule mapcache_module    modules/mod_mapcache.so

<IfModule mapcache_module>
    <Directory /usr/lib/apache2/modules>
       Order Allow,Deny
       Allow from all
    </Directory>
    MapCacheAlias /mapcache "/home/mwh/mapcache/mapcache.xml"
</IfModule>

But when I restart the server error generates telling the file is not there. What am I doing wrong in here?

apache2: Syntax error on line 234 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/conf.d/mapcache: Cannot load /etc/apache2/modules/mod_mapcache.so into server: /etc/apache2/modules/mod_mapcache.so: cannot open shared object file: No such file or directory Action 'graceful' failed.

Was it helpful?

Solution

It is built successfully and installed correctly in /usr/lib/apache2/modules directroy.

and

Cannot load /etc/apache2/modules/mod_mapcache.so into server: /etc/apache2/modules/mod_mapcache.so: cannot open shared object file: No such file or directory

The module isn't installed where the Apache expects it as per configuration.

So you might like to change the module's configuration to be:

LoadModule mapcache_module    /usr/lib/apache2/modules/mod_mapcache.so
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top