简体   繁体   English

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

[英]Laravel 5.1 install on Ubuntu white screen no errors in laravel.log and .env file exists

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 我已经为此苦苦挣扎了好几天,以至于我访问了laravel.io和laracasts堆栈上的每个链接,但仍然没有运气

Permissions on storage and bootstrap/cache changed to 777 存储和引导程序/缓存的权限已更改为777

When I browse to the welcome page on my app the result in inspector is 'get 200' for the pretty url 当我浏览到我的应用程序上的欢迎页面时,检查器中的结果是漂亮网址为“ get 200”

Artisan is functioning, key has been generated added to .env and app.php Artisan正在运行,已将密钥生成到.env和app.php中

No errors in apache log Apache日志中没有错误

I have upgraded php in Ubuntu 14.04 to version 5.6.14 mcrypt is installed 我已将Ubuntu 14.04中的php升级到版本5.6.14,已安装mcrypt

Would be really grateful if someone could shed some light on this 如果有人能对此有所启发,将不胜感激

Apache DocumentRoot Apache DocumentRoot

Seems like you are not shown the laravel page. 好像没有显示laravel页面。 Try to put something like the following in the public/index.php file of your laravel installation (at the beginning of the file): 尝试在laravel安装的public / index.php文件中放置以下内容(在文件的开头):

<?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. 如果浏览到站点,但看不到文本Laravel索引文件 ,则文档根目录指向其他位置。 As you are using Apache see for example the configuration of virtual hosts in Ubuntu . 当您使用Apache时,请参见例如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安装的公共目录,而不是laravel安装的根目录(例如, / home / user / public_html / my_laravel_app / public而不是/ home / user / public_html / my_laravel_app

Laravel routes Laravel路线

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 . 看看您的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). 上面的路由将包括resources / views / welcome.blade.php (或resources / views / welcome.php ),用于您对http:// localhost (或您的主机的样子)的请求。 Try to insert debugging information at the beginning of the welcome.blade.php, eg 尝试在welcome.blade.php的开头插入调试信息,例如

welcome.blade.php 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 您的apache配置文件
  • Path to your laravel app laravel应用程序的路径
  • Path to your info.php 您的info.php的路径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM