dynamic logs
Igor Sysoev
is at rambler-co.ru
Fri Sep 12 17:30:16 MSD 2008
On Thu, Sep 11, 2008 at 08:15:30PM +0000, Vladan Popovic wrote:
> Hi,
> I'm using version 0.716 and trying to make dynamic log files work.
> The log file is created but subsequently nothing is written inside the file.
> The configuration is as follows:
> # Catch all web site
> #
> server {
> server_name _ ;
>
> location /widgets/ { alias /home/http/lib/widgets/; }
> rewrite ^/crm/(.*)$ https://$host/crm/$1 permanent;
>
> if ($host ~* "^([^.]+(\.[^.]+)*)\.((.*)\.(com|net|org)(\..*)?)$"){
> set $subd $1;
> set $dom $3;
> set $myroot /sites/$dom/$subd/htdocs ;
> }
>
> location / {
> index index.php index.html index.htm;
> }
>
> root /home/http$myroot ;
> include php-fastcgi;
>
> access_log /var/log/nginx/$dom debug ;
>
> }
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 ?
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list