payback wrote:
> I've tried the apache docs and google but since I don't really know what
> I'm looking for I thought I'd ask here.
>
> First off I'm running:
> Mac OSX 10.2.8
> Apache 1.3.27
>
> Apache is logging the IP address of the user's proxy server in access_log.
> I'm wondering if there is a way to get it to log the user's real IP address
> instead. I realize that this isn't actually a log issue and that it lies
> deeper within apache and I'm assuming that making this change will also
> change the IP address the PHP recognizes for the user.
>
> This is most likely a simple matter but I truely have no idea where to
> start looking. If I'm barking up the wrong tree let me know.
In PHP, this is accessible via the $_SERVER['X_FORWARDED_FOR'] variable
when it is set. I believe that it's the apache variable
ENV{'HTTP_X_FORWARDED_FOR'} Therefore, going by the log format
(
http://httpd.apache.org/docs/mod/mod...g.html#formats), I
believe you could simply add the %{HTTP_X_FORWARDED_FOR}e to your
LogFormat line to get this recorded.
HTH
--
Justin Koivisto -
spam@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.