dynamic logs

Vladan Popovic vladanpopovic at be-o.com
Sat Sep 13 01:30:19 MSD 2008


Igor Sysoev <is at ...> writes:


> BTW, it's better to use
> 
> server {
>         server_name _ ;
> 
>         root        /home/http$myroot ;
>         access_log  /var/log/nginx/$dom debug ;
> 
>         if ($host ~* "^([^.]+(\.[^.]+)*)\.((.*)\.(com|net|org)(\..*)?)$"){
>                 set $dom  $3;
>                 set $myroot /sites/$dom/$1/htdocs ;
>         }
> 
>         location / {
>            index  index.php index.html index.htm;
>         }
> 
>         include         php-fastcgi;
> 
>         location ^~ /widgets/ { alias  /home/http/lib/widgets/; }
> 
>         location ^~ /crm/ { rewrite  ^  https://$host/$request_uri permanent; }
> }
> 
> What is in php-fastcgi ?
> 
thank you, but why is the order important?
php-fastcgi contains the following:
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
        location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_param HTTPS $ssl;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME 
/home/http$myroot$fastcgi_script_name;
                include        fastcgi_params;
        }









More information about the nginx mailing list