Welcome! Log In Create A New Profile

Advanced

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

All files from this thread

File Name File Size   Posted by Date  
mod_rpaf.png 8.5 KB open | download Jim Ohlstein 08/30/2011 Read message
Albuquerque Rui
August 31, 2011 08:00AM
2011/8/31 Gena Makhomed <gmm@csdoc.com>

> On 31.08.2011 10:03, Albuquerque Rui wrote:
>
> While accessing the page directly from apache i've got the good
>> values too. But when i pass by nginx then apache ( mod_rpaf ) the
>> hostname is not right :(
>>
>
> in request from nginx to apache backend - you set correct
> client hostname in the X-Forwarded-Host or X-Host header?
>
> RPAFsethostname on;
>
> means what you must provide desirable client hostname:
>
> source of mod_rpaf-0.6\mod_rpaf-2.0.c
> ------------------------------**-------
>
> if (cfg->sethostname) {
> const char *hostvalue;
> if (hostvalue = apr_table_get(r->headers_in, "X-Forwarded-Host")) {
> /* 2.0 proxy frontend or 1.3 => 1.3.25 proxy frontend */
> apr_table_set(r->headers_in, "Host", apr_pstrdup(r->pool,
> hostvalue));
> r->hostname = apr_pstrdup(r->pool, hostvalue);
> ap_update_vhost_from_headers(**r);
> } else if (hostvalue = apr_table_get(r->headers_in, "X-Host")) {
> /* 1.3 proxy frontend with mod_proxy_add_forward */
> apr_table_set(r->headers_in, "Host", apr_pstrdup(r->pool,
> hostvalue));
> r->hostname = apr_pstrdup(r->pool, hostvalue);
> ap_update_vhost_from_headers(**r);
> }
> }
>
>
In fact event with RPAFsethostname on; commented, there's a problem. In this
case we are talking about client remote hostname...




> --
> Best regards,
> Gena
>
>
> ______________________________**_________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/**mailman/listinfo/nginxhttp://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 30, 2011 12:08PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Maxim Dounin August 30, 2011 12:22PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 30, 2011 12:24PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Igor Sysoev August 30, 2011 12:36PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 30, 2011 12:46PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Jim Ohlstein August 30, 2011 12:46PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 30, 2011 12:48PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Jim Ohlstein August 30, 2011 01:40PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 30, 2011 02:30PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Jim Ohlstein August 30, 2011 04:20PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Maxim Dounin August 30, 2011 05:52PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug Attachments

Jim Ohlstein August 30, 2011 07:16PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 31, 2011 02:36AM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 31, 2011 03:04AM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Gena Makhomed August 31, 2011 07:00AM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 31, 2011 08:00AM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Gena Makhomed August 31, 2011 08:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 280
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready