Enabling mod_remoteip on Apache2 web server is done by issuing the following command with root privileges:

a2enmod remoteip

You will probably see the following output which informs you to restart Apache so that the configuration takes effect:

Enabling module remoteip.
To activate the new configuration, you need to run:
  systemctl restart apache2