lnmp配置Yii2规则

nginx配置:

参考地址:http://www.cnblogs.com/grimm/p/5389970.html

  1.     location / {  
  2.         try_files $uri $uri/ /index.php?$args;      
  3.        if (!-e $request_filename){
  4.              rewrite ^/(.*)$ /index.php?r=$1 last;
  5.         }
  6.         root   /usr/share/nginx/html;  
  7.         index  index.php  index.html  index.htm;  
  8.     }  

https://my.oschina.net/caomenglong/blog/660529

原文地址:https://www.cnblogs.com/yifan72/p/6000497.html