Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


   


   


   















      :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: X-Forwarded-For X-Real-IP


  • To: nginx-ru <nginx-ru@xxxxxxxxx>
  • Subject: Re: X-Forwarded-For X-Real-IP
  • From: Sergey Shepelev <temotor@xxxxxxxxx>
  • Date: Sun, 10 Jan 2010 20:24:49 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=kLa2W3l7OCLSN+sHGdPN8+eZCNQxUA3cspt8JEwHuGI=; b=XJowkv6af0HJ3VNRxk1tIutXmJmgUYtxNzEDD00gcx8d3vKONa5Vgw3xYy1gJLQ1y3 eK0fDy7FPKVRUDY0xBQr2KQ/CCr7K8bu7FZIr2Ach8OuALxkRmay1nfBt+/pRajdX9EO NRsePx5Nnvd71qXTr3ONZgEXelJNI4s7Yls6Q=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=fpwkD1GSNa6zCWODTMh1Rp5V2O6wL0VoJsQflr0uK0smniSmf0v/dn0ZYJxl2igvHh out/lbyQFhDlTsV4hflRUV8HfKrpETPHRBy+wMFnSNmJ5Yhip4tR8HJEJsrvKShOecVE C3EUIqg3oZHN0U5l8zFdjgnMOfuwb8m7ee/XI=
  • In-reply-to: <04a5f04f54a8a3750653e38cf9b12e26.NginxMailingListRussian@xxxxxxxxxxxxxxx>
  • References: <04a5f04f54a8a3750653e38cf9b12e26.NginxMailingListRussian@xxxxxxxxxxxxxxx>

2010/1/10 kassern <nginx-forum@xxxxxxxx>:
> !
>
>      -  phpinfo  :
> X-Forwarded-For     83.167.102.xxx
> X-Real-IP    83.167.102.xxx
>    ,   -   IP .     
>   .    .
>

 .        
 X-Host: XXXXX.ru,  PHP      
  ?

X-Real-IP    .
X-Forwared-For     (   )
   .

 , ,      (
)      ?

>
> user       nginx;
> worker_processes 1;
>
> error_log     /var/log/nginx/error.log;
> #error_log    /var/log/nginx/error.log notice;
> #error_log    /var/log/nginx/error.log info;
>
> pid        /var/run/nginx.pid;
>
>
>
> #----------------------------------------------------------------------
> # Events Module
> #
> #  http://wiki.codemongers.com/NginxEventsModule
> #
> #----------------------------------------------------------------------
>
> events {
>  worker_connections 1024;
> }
>
>
> #----------------------------------------------------------------------
> # HTTP Core Module
> #
> #  http://wiki.codemongers.com/NginxHttpCoreModule
> #
> #----------------------------------------------------------------------
>
> http {
>  include    /etc/nginx/mime.types;
>  default_type application/octet-stream;
>
>  log_format main '$remote_addr - $remote_user [$time_local] $request '
>           '"$status" $body_bytes_sent "$http_referer" '
>           '"$http_user_agent" "$http_x_forwarded_for"';
>
>  access_log /var/log/nginx/access.log main;
>
>  sendfile    on;
>  #tcp_nopush   on;
>
>  #keepalive_timeout 0;
>  keepalive_timeout 65;
>
>  #gzip on;
>
>  # Load config files from the /etc/nginx/conf.d directory
>  include /etc/nginx/conf.d/*.conf;
>
>  #
>  # The default server
>  #
>    client_max_body_size 16m;
>    server {
>        listen 188.72.226.197:80;
>        server_name XXXXX.ru www.XXXXX.ru hosting.XXXXX.ru 
> www.hosting.XXXXX.ru;
>        rewrite ^(/manager/.*)$ https://$host$1 permanent;
>        location ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) {
>            proxy_pass http://188.72.226.197:8080;
>            proxy_redirect http://XXXXX.ru:8080/ /;
>            proxy_set_header Host $host;
>            proxy_set_header X-Forwarded-For 
> $proxy_add_x_forwarded_for;
>            proxy_set_header X-Real-IP $remote_addr;
>        }
>        location / {
>            proxy_pass http://188.72.226.197:8080;
>            proxy_redirect http://XXXXX.ru:8080/ /;
>            proxy_set_header Host $host;
>            proxy_set_header X-Forwarded-For 
> $proxy_add_x_forwarded_for;
>            proxy_set_header X-Real-IP $remote_addr;
>        }
>        location ~* 
> ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar)$ {
>            root /var/www/XXXXX/data/www/XXXXX.ru;
>            access_log /var/www/httpd-logs/XXXXX.ru.access.log;
>            error_page 404 = @fallback;
>
>    nginx.
>   0.6.39
>
> Posted at Nginx Forum: 
> http://forum.nginx.org/read.php?21,39455,39455#msg-39455
>
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@xxxxxxxxx
> http://nginx.org/mailman/listinfo/nginx-ru
>
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.