I've got Apache 2.2.6 in production and we're *trialling* a new load balancer which is able to create an X-FORWARDED-FOR header.

I wanted to keep things simple as possible, and it looked like mod_remoteip was the module I wanted to use for this purpose. Simply using the mod_remoteip directive "RemoteIPHeader X-Forwarded-For" should do what I wanted.

Then I found out how difficult it was to FIND the source for mod_remoteip.  The
website decribed it as a BASE module, but that is apparently for Apache 2.3 and up, since it's not evident in my 2.2.6 sources.

FINALLY (and this was a few weeks ago so I don't recall where) I found a source
file for mod_remoteip.c.

Then off to several conferences and returning to the office, I learn the trial load balancer is on its way out the door in the next day or so.

Trying to compile mod_remoteip.c, I get errors suggesting that there was apparently a change in the structure of modules between when this source was created and the APXS that I'm trying to use from Apache 2.2.6 --

# /dlt/sw/httpd-2.2.6-cosign/bin/apxs -c mod_remoteip.c
/dlt/sw/httpd-2.2.6-cosign/build/libtool --silent --mode=compile cc -prefer-pic -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE -g -I/dlt/sw/httpd-2.2.6-cosign/include -I/dlt/sw/httpd-2.2.6-cosign/include -I/dlt/sw/httpd-2.2.6-cosign/include -c -o mod_remoteip.lo mod_remoteip.c && touch mod_remoteip.slo
"mod_remoteip.c", line 481: warning: function prototype parameters must have 
types
"mod_remoteip.c", line 481: warning: old-style declaration or incorrect type for: AP_DECLARE_MODULE
"mod_remoteip.c", line 481: cannot initialize function: AP_DECLARE_MODULE
"mod_remoteip.c", line 481: cannot recover from previous errors
cc: acomp failed for mod_remoteip.c
apxs:Error: Command failed with rc=65536
.
#

Short of modifying the source code to backfit it to 2.2.6 (which I am at a loss how to do), it's been suggested I look at mod_proxy, which is apparently part of the base for 2.2.6 (I am explicitly NOT loading this module right now). But I don't see the header "X-Forwarded-For" cited anywhere in the mod_proxy documentation, and I would expect that if this is a typical use of mod_proxy, there'd be SOMETHING like that noted there.

Thoughts on either the refitting for Apache 2.2.6 of mod_remoteip, using mod_proxy for the same purpose, or some other method of achieving this with the module's I've got to work with?

--
J.Lance Wilkinson ("Lance")           InterNet: lance.wilkin...@psu.edu
Systems Design Specialist - Lead        Phone: (814) 865-4870
Digital Library Technologies            FAX:   (814) 863-3560
E3 Paterno Library
Penn State University
University Park, PA 16802

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to