How to enable Mod_rpaf in Linux server

Mod_rpaf is the Apache-2.2 module for reverse proxy. Set the header for REMOTE_ADDR, HTTPS, and HTTP_PORT from upstream proxy environment variables.

This article explains the steps to install mod_rpaf module in a Linux server.

Step1: Change the location

# cd /usr/local/src

Step2: Download the mod_rpaf package

# wget -O

Step3: Extract the downloaded package

# unzip

Step4: Change the location to extracted folder

# cd mod_rpaf-master

Step5: Compile and install the source

# make && make install

Step6: Open the configuration file /usr/local/apache/conf/includes/pre_virtualhost_global.conf and save the below lines. Please note, you will want to replace the server-ipaddress’s with the ones doing the forwarding.

LoadModule rpaf_module modules/
RPAF_Enable On
RPAF_Header X-Real-IP
RPAF_SetHostName On
RPAF_ProxyIPs server-ipaddress

Step7: Restart apache service

# /etc/init.d/httpd restart

Leave a Reply