ПРОЕКТЫ 


  АРХИВ 


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: Nginx и виртуальные хост ы



Denis F. Latypoff пишет:


server
{
    listen ip:port;
    server_name domain.com;

    location ~* ^/statics\/.*\.(png|jpg|jpeg|gif|swf)$
    {
        root /home/httpd/domain.com/statics;
    }

    location /
    {
        proxy_pass http://127.0.0.1:8008;
    }
}

^^^
Тут получается надо еще симв. ссылку создавать в сайту с доменом 3 уровня?


server
{
    listen ip:port;
    server_name site1.domain.com;

    location ~* ^/statics\/.*\.(png|jpg|jpeg|gif|swf)$
    {
        root /home/httpd/site1.domain.com/statics;
    }

    location /
    {
        proxy_pass http://127.0.0.1:8008;
    }
}

server
{
    listen ip:port;
    server_name site2.domain.com;

    location ~* ^/statics\/.*\.(png|jpg|jpeg|gif|swf)$
    {
        root /home/httpd/site2.domain.com/statics;
    }

    location /
    {
        proxy_pass http://127.0.0.1:8008;
    }
}



То есть кроме как создания списка location'ов больше никак?

---------------------
с уважением Евгений Фоминых.





 




Copyright © Lexa Software, 1996-2009.