| Nginx-ru mailing list archive (nginx-ru@sysoev.ru) [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: x-accel-redirect
 
 
Igor Sysoev wrote:
 
On Wed, 22 Feb 2006, Dmitriy MiksIr wrote:
 
 
 
Голова моя - проблема моя =))
В общем решил свою задачу так:
    map $int_host $root {
       default /.../htdocs/;
       include conf/root.conf;
    }
    server {
        location / {
            proxy_pass          ;
            proxy_set_header    X-Real-IP  $remote_addr;
            proxy_set_header    X-Accel-Internal /internal;
            proxy_set_header    Host $http_host;
            proxy_set_header    X-IP-Geo $country;
        }
        location /internal/ {
            internal;
            set $int_host $http_host;
            root /$root;
            rewrite ^/internal/(.*)$ /$1 break;
        }
   }
Таким образом добавление виртуальных хостов свелось к правке conf/root.conf.
А вот как можно вести логи для каждого виртуального хоста? Можно ли там 
использовать переменнные (в качестве имени файла)
PS.
nginx не собрался с --with-http_perl_module и --without-http_ssi_module
и, imho, make clean не должен убивать Makefile =)
 
Игорь Сысоев
 
 
 |