After installing mod_rpaf, I set my config file (/etc/apache2/mods-available/rpaf.conf) as follows:

<IfModule mod_rpaf.c>
    RPAFenable On
    RPAFsethostname On
    RPAFheader X-Real-IP

However, now when I restart apache2 I get an error:

Invalid command 'RPAFheader', perhaps misspelled or defined by a module not included in the server configuration

Removing the RPAFheader line resolves the problem, but I really need this setting. Does anyone have any ideas?

  • What distro and version of Linux are you using? The RPAFheader command was added in version 0.6 of mod_rpaf and older versions of some distros still use 0.5.
    – Ladadadada
    Mar 12, 2013 at 14:06
  • @Ladadadada Thanks for your reply - I'm on Ubuntu 10.04.4. Do you know what version of the distro this uses?
    – Jonathan
    Mar 12, 2013 at 14:27

1 Answer 1


Ubuntu 10.04 includes version 0.5 of mod_rpaf but the RPAFheader command was added in version 0.6. Ubuntu 12.04 comes with mod_rpaf version 0.6 for some architectures and 0.5 for others.

Ubuntu 12.04 also contains a bug which means you have to change

<IfModule mod_rpaf.c>


<IfModule mod_rpaf-2.0.c>

before it will work.

Note that with Apache 2.4, mod_rpaf is no longer needed and is replaced by mod_remoteip.

  • 1
    For future reference, these instructions showed me how to install the current version of mod_rpaf. I was then able to use RPAFheader.
    – Jonathan
    Mar 13, 2013 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.