配置并将我的Laravel 5项目从本地机器复制到服务器后,但出乎我的意料,我得到了白屏。
我所做的是:
- 我改变了
.htaccess
粘贴代码从Laravel文档 - 我没有
paths.php
文件,但得到了一个https://github.com/laravel/laravel/blob/834cb7530df5ea28803569fd6bf28c6e759170ef/bootstrap/paths.php
这是一个类似的问题但不同的是我没有public_html文件夹和公共文件夹
这是我的index.php
现在的样子
require __DIR__.'/bootstrap/autoload.php';
$app = require_once __DIR__.'/bootstrap/start.php';
$kernel = $app->make(Illuminate'Contracts'Http'Kernel::class);
$response = $kernel->handle(
$request = Illuminate'Http'Request::capture()
);
$response->send();
$kernel->terminate($request, $response)
vhost我 <VirtualHost *:80>
DocumentRoot /var/www/html/
<Directory "/var/www/html/kidio/mergeogle/laravel/public">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
Allow from all
</Directory>
</VirtualHost>
my storage permission
drwxrwsrwx. 2 apache apache 23 Aug 9 13:48 app
drwxrwsrwx. 5 apache apache 62 Aug 9 13:48 framework
drwxrwsrwx. 2 apache apache 23 Aug 9 13:48 logs
checking the stat storage/
File: ‘storage/’
Size: 43 Blocks: 0 IO Block: 4096 directory
Device: ca02h/51714d Inode: 50945968 Links: 5
Access: (0777/drwxrwxrwx) Uid: ( 48/ apache) Gid: ( 48/ apache)
Context: unconfined_u:object_r:httpd_sys_content_t:s0
Access: 2015-08-10 03:49:01.336664540 -0400
修改:2015-08-09 13:48:39.877778729 -0400变更:2015-08-10 01:58:35.125307307 -0400出生:-
and my bootstrap permissions are as follow
stat bootstrap/
File: ‘bootstrap/’
Size: 83 Blocks: 0 IO Block: 4096 directory
Device: ca02h/51714d Inode: 980216 Links: 3
Access: (2777/drwxrwsrwx) Uid: ( 1000/ec2-user) Gid: ( 1001/ www)
Context: unconfined_u:object_r:httpd_sys_content_t:s0
Access: 2015-08-10 01:58:35.124307329 -0400
Modify: 2015-08-10 00:52:14.407629336 -0400
Change: 2015-08-10 01:58:35.124307329 -0400
Birth: -
我的设置没有任何问题,我所做的唯一一件事使它工作
setenforce = 0
我认为这在某种程度上可能是危险的。