doujieyu7062 2015-10-21 05:20 采纳率: 0%
浏览 44
已采纳

在Ubuntu白屏上安装Laravel 5.1,laravel.log和.env文件中没有错误

I have been struggling with this for days now, to the point where I have visited every link on stack laravel.io and laracasts and still no luck

Permissions on storage and bootstrap/cache changed to 777

When I browse to the welcome page on my app the result in inspector is 'get 200' for the pretty url

Artisan is functioning, key has been generated added to .env and app.php

No errors in apache log

I have upgraded php in Ubuntu 14.04 to version 5.6.14 mcrypt is installed

Would be really grateful if someone could shed some light on this

  • 写回答

1条回答 默认 最新

  • dongtongjian3127 2015-10-21 05:33
    关注

    Apache DocumentRoot

    Seems like you are not shown the laravel page. Try to put something like the following in the public/index.php file of your laravel installation (at the beginning of the file):

    <?php
        die('Laravel index file');
    

    If you browse to your site and don't see the text Laravel index file, your document root is pointing somewhere else. As you are using Apache see for example the configuration of virtual hosts in Ubuntu.

    Note, that the document root should point to the public directory of your laravel installation, not the root directory of your laravel installation (so eg /home/user/public_html/my_laravel_app/public instead of /home/user/public_html/my_laravel_app)

    Laravel routes

    EDIT: As you said, you saw the text, the next step for me would be to check the routes. Have a look at your app/Http/routes.php. What file is included for your request?

    <?php
    
    Route::get('/', function () {
        return view('welcome');
    });
    

    The above route would include resources/views/welcome.blade.php (or resources/views/welcome.php) for your request to http://localhost (or whatever your host looks like). Try to insert debugging information at the beginning of the welcome.blade.php, eg

    welcome.blade.php

    <h1>Welcome.blade.php</h1>
    

    Check if you can see the above text on your web request.

    Other ideas

    Maybe it would be useful to also have the following information:

    • Your apache config file
    • Path to your laravel app
    • Path to your info.php
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 宇视监控服务器无法登录
  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)