lnmp thinkphp5 nginx 配置文件

server
    {
        listen 80;
        #listen [::]:80;
        server_name dlsj.mrpzx.com;
        index index.php index.html;
access_log off;

set $root /home/wwwroot/dlsj.mrpzx.com/public;
        location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$  
{  
root $root;  
}  
 
   root $root;
 
   location @rewrite {      
rewrite ^(.*)$ index.php/$1 last;      
}   
 
location /{  
if ( !-e $request_filename) {  
rewrite ^(.*)$ /index.php/$1 last;  
break;  
}  
}  
 
location ~ [^/]\.php(/|$)
        {
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
            include pathinfo.conf;
        }
    }

你可能感兴趣的:(lnmp thinkphp5 nginx 配置文件)