I uploaded it to my local virtual machine (Vbox centos lemp environment)
I use the mac xampp environment to debug quickstart (git), my routing
Route::group(['domain' => 'u.ok.com', 'middleware' => 'web'], function () { Route::get('/', function () { return view('welcome');//正常显示 })->middleware('guest');//游客页面 //以下这几条,主要是登陆在虚拟机浏览都是404 Route::get('/tasks', 'TaskController@index'); Route::post('/task', 'TaskController@store'); Route::delete('/task/{task}', 'TaskController@destroy'); Route::auth(); }); Route::group(['domain' => 's.ok.com'], function () { Route::get('/', 'Test\NewsArr@index');//正常显示 }); Route::group(['domain' => 'a.ok.com'], function () { Route::get('/', 'Test\NewsArr@generate');//正常显示 });
I don’t understand the reason for this. The above routes work well on mac, but when uploaded to a virtual machine, the above mentioned 404
will appear.
There is a problem with nginx configuration, please post it and take a look
Nginx configuration (applicable to PHP framework whose route is index.php?routes):