Technology Stack - EBS (MOSC)

MOSC Banner

How To Show The Client IP Address In The Access Log and error_log When Using A Load Balancer

edited Jan 18, 2014 5:01PM in Technology Stack - EBS (MOSC) 1 commentAnswered

Hi All,

Customer followed note 1355549.1 and added %h to last line.

# grep LogFormat httpd.conf
LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" X-Forwarded-For
LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %b %T"
#

The log become slight different format, but client IP can be seen now.

- asiatweb13.ang.sing.seagate.com - - [07/Jan/2014:14:52:02 +0800] "GET /oprocmgr-service?cmd=Register&index=1&modName=JServ&grpName=OACoreGroup&port=22179 HTTP/1.1" 200 15 0
- asiatweb13.ang.sing.seagate.com - - [07/Jan/2014:14:52:02 +0800] "GET /oprocmgr-service?cmd=Register&index=0&modName=JServ&grpName=OACoreGroup&port=22180 HTTP/1.1" 200 15 0

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center