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?
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
into
before it will work.
Note that with Apache 2.4, mod_rpaf is no longer needed and is replaced by mod_remoteip.