Restart Apache to activate these changes: /etc/init.d/apache2 restartĮdit the RPAF configuration file at /etc/apache2/mods-available/nf with your favorite text editor. Install the libapache2-mod-remoteip package using your favorite package manager: apt-get install libapache2-mod-remoteipĮnable mod_remoteip by executing: a2enmod remoteip With the configuration directive RemoteIPHeader you can now change the default X-Forwarded-For to X-Real-IP if you so choose. If you do not use the RemoteIPInternalProxy directive then the module will not change the remote address of the incoming connection at any time. With the former you can define which IP's are your frontend proxies that send the correct X-Forwarded-For headers. Module configuration is pretty simple there are only two directives to set - RemoteIPInternalProxy and RemoteIPHeader. For earlier versions mod_rpaf should be used and is detailed below. On Apache 2.4 or higher mod_remoteip is available and recommended. If you use mod_rpaf on the backend server you do not need to use any module or server side technology to set the remote_ip of the real client you are serving. It is possible to retrieve the connecting users IP address from the X-Real-IP header through the mod_rpaf or mod_remoteip module for Apache 2. Obtaining the connecting clients IP address (Real IP) with ApacheĪpache is one of the most popular Open Source webservers available.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |