laravel5.2 quickstart implements local login, registration is using the original Auth, and 404 after uploading
漂亮男人
漂亮男人 2017-05-16 16:52:22
0
2
511

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.
漂亮男人
漂亮男人

reply all(2)
小葫芦

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):

server
{
    listen              80;
    server_name         example.com;  #改成你的域名
    root     /var/www/html;  #改成你的document_root
    index    index.php index.html index.htm;
 
    location  /
    {
        try_files $uri $uri/ /index.php?$query_string;  #关键部分
    }
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template