nginx配置文件中添加:php
set $root_path '/data/www/m.domain.com/public';
root $root_path;nginx
location / {
try_files $uri $uri/ /index.php?$query_string;
}web
框架目录下的routes/web.php中添加测试代码app
$app->get('test/show', 'TestController@show');框架
而后添加TestController控制器和show方法
访问测试地址
http://m.domain.com/test/show