Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: оптимизация конфига
On Sun, 27 Apr 2008, Борис Долгов wrote:
> Привет,
> Почитал руководство, не смог понять, как map может помочь проблеме.
У меня примерно так:
map $host $sroot {
hostnames;
default www/Default/html;
include vhostmap.conf;
}
# Meta-server using map above
server {
include listen.conf;
server_name _ ;
server_name_in_redirect off;
location / {
root /$sroot;
index index.php index.html index.shtml index.htm index.wml;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
location ~ (/cgi-bin/)|(\.(php|cgi|pl)$) {
proxy_pass http://127.0.0.1;
}
Sincerely,
D.Marck [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer: marck@xxxxxxxxxxx ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@xxxxxxxx ***
------------------------------------------------------------------------
|