Re: оптимизация конфига

Dmitry Morozovsky marck at rinet.ru
Sun Apr 27 17:31:08 MSD 2008


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 at FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
------------------------------------------------------------------------





More information about the nginx-ru mailing list