lumen路由配置nginx


    nginx配置文件中添加:

    set   $root_path   '/data/www/m.domain.com/public';
    root   $root_path;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

 

   框架目录下的routes/web.php中添加测试代码

   $app->get('test/show', 'TestController@show');

然后添加TestController控制器和show方法

访问测试地址
http://m.domain.com/test/show

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM