[solved] Allow VH to Inherit Server logFormat Setting

Discussion in 'Feedback/Feature Requests' started by Atticus, Apr 19, 2011.

  1. Atticus

    Atticus New Member

    Hi there!

    I am running Litespeed 4.1 Gold in a load balanced environment. While the load balancer supplies the remote client IP address in its own header, Litespeed logs using the default Remote Host header which is that of the load balancer. This makes the standard combined format logs pretty useless in way of tracking requests.

    The solution for individual virtual servers is pretty simple. Change the logFormat and include the alternate HTTP header. This is not so simple if you need to update the XML files of 200+ virtual hosts.

    Would it be possible to have an option to enable all virtual hosts to adopt the logFormat used by the server configuration?

    Thank you!
    Last edited by a moderator: Apr 21, 2011
  2. mistwang

    mistwang LiteSpeed Staff

  3. Atticus

    Atticus New Member

    Except X-Forwarded-For is not the header presented making that not so helpful.
  4. webizen

    webizen New Member

  5. Atticus

    Atticus New Member

    Set it on the web server side? Litespeed is the web server. Our load balancer uses a header other than X-Forwarded-For making the Client IP Header feature useless. We can't change that. Mind you, we don't use LSLB.

    Aside from this one example of different client IP headers, being able to specify a logFormat that is shared by all VH would be supremely beneficial. The method you keep linking me to will not accomplish the need presented.
  6. webizen

    webizen New Member

    You can use LogFormat in Server level for VH sharing. X-Forwarded-For header is supported for Apache LogFormat compatibility.
  7. Atticus

    Atticus New Member

    I set the server-level logFormat and it was not inherited by any of the VHs. Any idea why that may be?
  8. webizen

    webizen New Member

    What log format are you using?
  9. Atticus

    Atticus New Member

    A slightly modified combined format - %{X-Client-IP}i - %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"
  10. webizen

    webizen New Member

    pls try with 4.1. it should work.
  11. Atticus

    Atticus New Member

    As I stated in my original post, I am using 4.1.
  12. webizen

    webizen New Member

    should have said the latest 4.1. just do force reinstall from admin console.
  13. Atticus

    Atticus New Member

    Aha, I see. Yes, this appears to have done the trick. All of the sudden feature implemented. Thank you :)

Share This Page