2

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
    RPAFproxy_ips 127.0.0.1
    RPAFheader X-Real-IP
</IfModule>

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?

Jonathan
  • 1,279
  • 2
  • 20
  • 28
  • 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 '13 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 '13 at 14:27

1 Answers1

2

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>

into

<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.

Ladadadada
  • 25,847
  • 7
  • 57
  • 90
  • 1
    For future reference, [these instructions](http://mclear.co.uk/2011/09/09/how-to-install-mod_rpaf-varnish-wordpress-ubuntu/) showed me how to install the current version of mod_rpaf. I was then able to use RPAFheader. – Jonathan Mar 13 '13 at 09:34