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