ПРОЕКТЫ 


  АРХИВ 


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]

0.7.19 && $server_addr


  • To: nginx-ru@xxxxxxxxx
  • Subject: 0.7.19 && $server_addr
  • From: Vladimir Yeshchenko <des@xxxx>
  • Date: Fri, 17 Oct 2008 14:20:31 +0300

Здравствуйте!
Собрал 0.7.19 в FreeBSD 6.2-RELEASE-p9.
Что-то не то с переменной $server_addr или я не умею ее использовать.
1. в логе вместо $server_addr пусто.
2. в заголовке X-Proxy-IP тоже пусто.

user  nobody;
worker_processes  6;

error_log  /usr/local/www/nginx/logs/error.log;

events {
   worker_connections  2048;
}

http {
   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" "$http_host" "$server_addr"';

       sendfile        on;

       keepalive_timeout  0;
       ignore_invalid_headers on;
       large_client_header_buffers 8 32k;

       upstream  backend  {
            server   89.18.189.xx:80;
       }

   server {
       listen          85.12.43.xx:80;
       listen          85.12.43.xx:80;

       server_name  localhost;
       access_log  /usr/local/www/nginx/logs/85.12.43.xx/access.log main;

       location / {
           proxy_pass                          http://backend;
           proxy_set_header                    X-Real-IP $remote_addr;
           proxy_set_header                    X-Proxy-IP $server_addr;
           proxy_pass_request_headers          On;
           client_max_body_size                10m;
           client_body_buffer_size             128k;
           proxy_connect_timeout               10;
       }
   }
}



 




Copyright © Lexa Software, 1996-2009.