Adding module to Apache-httpd

Hi,

I need the module "mod_remoteip" which is not included in the standard http=
d-2.2.14 distribution. I downloaded the source code from people.apache.org/=
~wrowe/mod_remoteip.c. There is no instruction for the source code as how t=
o compile the module. On the Apache's web site, the document shows that aft=
er httpd v1.3, to add additional module, simply add a line to the 'configur=
e' file in the source directory and then compile:

AddModule modules/extra/mod_remoteip.c

and I copied the file to the location. The compilation went through no prob=
lem as I included some other modules such as ssl, proxy, etc. but I don't t=
hink Apache compiled the module for me. Does anyone know how to add module =
to Apache-httpd compilation or maybe simply compile the module and then loa=
d the module to the httpd? Thanks in advance.

Ryan Jiang



This message (including any attachments) is intended
solely for the specific individual(s) or entity(ies) named
above, and may contain legally privileged and
confidential information. If you are not the intended
recipient, please notify the sender immediately by
replying to this message and then delete it.
Any disclosure, copying, or distribution of this message,
or the taking of any action based on it, by other than the
intended recipient, is strictly prohibited.


------------------------------------------------------------ ---------
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-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Ruiyuan Jiang [ Fr, 20 November 2009 23:36 ] [ ID #2023504 ]

Re: Adding module to Apache-httpd

Ruiyuan Jiang wrote:
> Hi,
>
> I need the module "mod_remoteip" which is not included in the standard httpd-2.2.14 distribution.

http://httpd.apache.org/docs/2.2/programs/apxs.html

--
Nick Kew

------------------------------------------------------------ ---------
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-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Nick Kew [ Fr, 20 November 2009 23:48 ] [ ID #2023505 ]

RE: Adding module to Apache-httpd

I compiled remoteip module and loaded it without problem.
In one of my virtualhost of Apache reverse proxy, I added and tested:

RemoteIPHeader X-Client-IP
Or
RemoteIPHeader X-Forwarded-For

Or both

I don't see the remote client IP is being forwarded to the backend server f=
rom Apache as it supposed to be. Does anyone know why or what I did wrong? =
Thanks.

Ryan

-----Original Message-----
From: Nicholas.Kew [at] Sun.COM [mailto:Nicholas.Kew [at] Sun.COM] On Behalf Of Nick =
Kew
Sent: Friday, November 20, 2009 5:48 PM
To: users [at] httpd.apache.org
Subject: Re: [users [at] httpd] Adding module to Apache-httpd

Ruiyuan Jiang wrote:
> Hi,
>
> I need the module "mod_remoteip" which is not included in the standard ht=
tpd-2.2.14 distribution.

http://httpd.apache.org/docs/2.2/programs/apxs.html

--
Nick Kew

------------------------------------------------------------ ---------
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-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org




This message (including any attachments) is intended
solely for the specific individual(s) or entity(ies) named
above, and may contain legally privileged and
confidential information. If you are not the intended
recipient, please notify the sender immediately by
replying to this message and then delete it.
Any disclosure, copying, or distribution of this message,
or the taking of any action based on it, by other than the
intended recipient, is strictly prohibited.


------------------------------------------------------------ ---------
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-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Ruiyuan Jiang [ Mi, 25 November 2009 18:28 ] [ ID #2024020 ]

Re: Adding module to Apache-httpd

Ruiyuan Jiang wrote:
> I compiled remoteip module and loaded it without problem.
> In one of my virtualhost of Apache reverse proxy, I added and tested:
>
> RemoteIPHeader X-Client-IP
> Or
> RemoteIPHeader X-Forwarded-For
>
> Or both
>
> I don't see the remote client IP is being forwarded to the backend server from Apache as it supposed to be. Does anyone know why or what I did wrong? Thanks.

There is the %{Header-Name}i syntax of the custom log, so you could easily
verify which header is actually in use. X-Forwarded-For is the usual 'public'
method, but nobody promises you'll have such information assigned. The other
example would entirely depend on your load balancer/router which picks up the
requests and has redispatched them. Usually such devices will *not* share any
info over the web, but replace that particular header unilaterally.

Also note the module will only set the IP address as 'authentic' when the remote
machine is trusted, see

http://httpd.apache.org/docs/trunk/mod/mod_remoteip.html#rem oteipinternalproxy

and the commentary at the top of that page.

[I'm thinking about a RemoteIPTrustedHeader directive that wouldn't deal with
that scrutiny, but I'm a bit hesitant. You know your own IP's of your own
infrastructure to trust such proxies, right?]

------------------------------------------------------------ ---------
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-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
wrowe [ Di, 01 Dezember 2009 02:38 ] [ ID #2024486 ]

RE: Adding module to Apache-httpd

Hi, William

Can you give me more details:

There is the %{Header-Name}i syntax of the custom log, so you could easily
verify which header is actually in use. X-Forwarded-For is the usual 'publ=
ic' method,

I will use Apache as reverse proxy not forward proxy. So the IPs are from I=
nternet user not internal private IP users. The remote internal IP is not s=
uitable for me in my case. Thanks.

Ryan

-----Original Message-----
From: William A. Rowe Jr. [mailto:wrowe [at] rowe-clan.net]
Sent: Monday, November 30, 2009 8:39 PM
To: users [at] httpd.apache.org
Subject: Re: [users [at] httpd] Adding module to Apache-httpd

Ruiyuan Jiang wrote:
> I compiled remoteip module and loaded it without problem.
> In one of my virtualhost of Apache reverse proxy, I added and tested:
>
> RemoteIPHeader X-Client-IP
> Or
> RemoteIPHeader X-Forwarded-For
>
> Or both
>
> I don't see the remote client IP is being forwarded to the backend server=
from Apache as it supposed to be. Does anyone know why or what I did wrong=
? Thanks.

There is the %{Header-Name}i syntax of the custom log, so you could easily
verify which header is actually in use. X-Forwarded-For is the usual 'publ=
ic'
method, but nobody promises you'll have such information assigned. The oth=
er
example would entirely depend on your load balancer/router which picks up t=
he
requests and has redispatched them. Usually such devices will *not* share =
any
info over the web, but replace that particular header unilaterally.

Also note the module will only set the IP address as 'authentic' when the r=
emote
machine is trusted, see

http://httpd.apache.org/docs/trunk/mod/mod_remoteip.html#rem oteipinternalpr=
oxy

and the commentary at the top of that page.

[I'm thinking about a RemoteIPTrustedHeader directive that wouldn't deal wi=
th
that scrutiny, but I'm a bit hesitant. You know your own IP's of your own
infrastructure to trust such proxies, right?]

------------------------------------------------------------ ---------
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-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org




This message (including any attachments) is intended
solely for the specific individual(s) or entity(ies) named
above, and may contain legally privileged and
confidential information. If you are not the intended
recipient, please notify the sender immediately by
replying to this message and then delete it.
Any disclosure, copying, or distribution of this message,
or the taking of any action based on it, by other than the
intended recipient, is strictly prohibited.


------------------------------------------------------------ ---------
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-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Ruiyuan Jiang [ Di, 01 Dezember 2009 16:13 ] [ ID #2024512 ]
Webserver » gmane.comp.apache.user » Adding module to Apache-httpd

Vorheriges Thema: Marked as spam?
Nächstes Thema: Apache httpd does not respect the HTTP RFCs !