2

big problem (for me) is:

I was able to install /usr/lib/apache2/modules/mod_md.so. It's Apache Module mod_md.

But it is impossible to get module mod_watchdog. mod_md needs mod_watchdog (see documentation: "Prerequisites. This module requires mod_watchdog to be loaded as well. ")

Does Ubuntu 18.04.1 supports mod_watchdog? It seems not.

If that's the case, where can I get sourcecode? Is it the only way? Or does there exists compiled versions of mod_watchdog?

1 Answers1

4

It looks like mod_watchdog is a part of the package apache2-dev. So what I've tried on a virtual machine is:

sudo apt install apache2-dev
sudo apt install libapache2-mod-md
sudo a2enmod md
sudo systemctl restart apache2.service

There wasn't provided any error message. So probably you will be able to use mod_md - I haven't made further tests...


If the above doesn't help, another alternative, that you can try is to extract this module from a package of any other Linux distribution, where it is compiled. Time ago, I was made this for mod_authn_google.so - review section 6 in this answer.

Ubuntu 18.04 Bionic comes with Apache/2.4.29. I found mod_watchdog-2.4.23-1...x86_64.rpm in this repository, and probably it will be comparable with the Apache's version of Bionic. So the steps to deploy this package on your system are:

# Install the dependencies
sudo apt install rpm2cpio

# Download the package
cd $HOME/Downloads
wget http://abf-downloads.openmandriva.org/3.0/repository/x86_64/main/release//apache-mod_watchdog-2.4.23-1-omv2015.0.x86_64.rpm

# Extract the module file
rpm2cpio apache-mod_watchdog-2.4.23-1-omv2015.0.x86_64.rpm | \
cpio -iv --to-stdout ./usr/lib64/apache/mod_watchdog.so > mod_watchdog.so

# Deploy the module
sudo mv mod_watchdog.so /usr/lib/apache2/modules/
sudo chown root:root /usr/lib/apache2/modules/mod_watchdog.so
sudo chmod 644 /usr/lib/apache2/modules/mod_watchdog.so

# Create .load file
echo "LoadModule mod_watchdog /usr/lib/apache2/modules/mod_watchdog.so" | \
sudo tee /etc/apache2/mods-available/mod_watchdog.load

# Enable the module and restart Apache2
sudo a2enmod mod_watchdog
sudo systemctl restart apache2.service
pa4080
  • 29,831
  • 2
    Shame on me. Using command apache2 -V . I can see: compiled in modules: mod_watchdog.c . Thanks for help. – Klaus Lehmann Oct 30 '18 at 07:52
  • Tried both options: option 1 fails with libapache2-mod-md package not found. and option 2 fails with apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/mod_watchdog.load: Can't locate API module structuremod_watchdog' in file /usr/lib/apache2/modules/mod_watchdog.so: /usr/lib/apache2/modules/mod_watchdog.so: undefined symbol: mod_watchdog ` error – Thamaraiselvam Sep 09 '20 at 12:31