Saturday, 13 September 2014

X-Forwarded-For

How do we  configure IBM HTTP Server to set a header called "X-Forwarded-For" equal to the IP address of the client?


Note:The X-Forwarded-For header is not required by IBM HTTP Server (IHS) or by IBM WebSphere Application Server (WAS). But it may be required by software from other vendors.


#######set a header called "X-Forwarded-For" equal to the IP address of the client######
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
RewriteEngine on
RewriteRule ^(.*) - [E=CLIENT_IP:%{REMOTE_ADDR},L]
RequestHeader set x-forwarded-for %{CLIENT_IP}e




  1. To configure IBM HTTP Server to set the X-Forwarded-For header to the client IP address, in a non-proxy request, you need to enable the mod_rewrite and mod_headers modules, and then add the following lines in the IBM HTTP Server config (httpd.conf):
  2. No configuration is necessary when IBM HTTP Server is configured as a reverse proxy, as this header is added automatically by mod_proxy_http
  3. more:http://en.wikipedia.org/wiki/X-Forwarded-For

1 comment:

  1. Does it send X-Forwarded-For header? or the $WSRA? which would have the client IP?

    ReplyDelete

Dump Event "systhrow" (00040000) Detail "java/lang/OutOfMemoryError" "Failed to create a thread: retVal -1073741830, errno 11" received

1. Output of the following commands (non root): ulimit -u ulimit -a df -k 2. From any of the JVM that is running, please get it's...