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 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图2.0 版本点聚合中Marker的位置无法实时更新,如何解决呢?
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题