win nginx thinkphp5 配置

来源:互联网 发布:mac dosbox debug.exe 编辑:程序博客网 时间:2024/06/05 01:11
#START-SITE
server {


listen 80;  
    server_name    xxx.xxx.com;  
    access_log    logs/xxx.xxx.com.access.log;  
    set        $root     D:/wwwroot/thinkphp5/public;
    location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$  
    {  
        root $root;  
    }  
      
   root $root;  
   index index.php index.html index.htm;  
     
   location @rewrite {      
            rewrite ^(.*)$ index.php/$1 last;      
        }   
  
    location /{  
        if ( !-e $request_filename) {  
            rewrite ^(.*)$ /index.php/$1 last;  
            break;  
        }  
    }  
      
    location ~ \.php {  
        root    $root;  
       fastcgi_pass 127.0.0.1:4570;
        fastcgi_index  index.php;  
        fastcgi_split_path_info  ^(.+\.php)(.*)$;  
        fastcgi_param PATH_INFO $fastcgi_path_info;  
        fastcgi_param SCRIPT_FILENAME $root$fastcgi_script_name;  
        include        fastcgi_params;  
    }  





#END-PHP
}
#END-SITE