1

After configuring and copying my Laravel 5 project from local machine to the server but from my surprise I am getting white screen.

What I did is:

  1. I changed .htaccess to paste the code from Laravel document
  2. I was not having paths.php file but and got one https://github.com/laravel/laravel/blob/834cb7530df5ea28803569fd6bf28c6e759170ef/bootstrap/paths.php

The is a similar question like this one but the difference is that i don't have public_html folder and public folder

This is how my index.php look at the moment

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)

my 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

Modify: 2015-08-09 13:48:39.877778729 -0400 Change: 2015-08-10 01:58:35.125307307 -0400 Birth: -

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: -
rtruszk
  • 3,902
  • 13
  • 36
  • 53
Reginwaldt Led
  • 369
  • 3
  • 9
  • 19
  • possible duplicate of [Uploading Laravel Project onto Web Server](http://stackoverflow.com/questions/22075238/uploading-laravel-project-onto-web-server) – Abdulla Nilam Aug 10 '15 at 05:18
  • check **document root path** of vhost on server, it should be upto public directory as your **index.php** is in public folder – Tayyab Hussain Aug 10 '15 at 06:25
  • @Tayyab_Hussain I posted ny vhost – Reginwaldt Led Aug 10 '15 at 06:29
  • I think it might be some PHP error and displaying of errors is disabled. First check with `die('test')` at beginign of index.php if correct script is running, and then add code to display errors. at beginning. – Volvox Aug 10 '15 at 07:02
  • @Volvox i can see the output text "test" on the browser but it does not start the index.php source code any suggestion? – Reginwaldt Led Aug 10 '15 at 07:35
  • Does your storage folder and subdirectories have write permissions? – Jeemusu Aug 10 '15 at 07:41
  • @Jeemusu my storage directory permissions are 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 – Reginwaldt Led Aug 10 '15 at 07:49
  • how about the sub directories? like the framework/views directory? Try enabling error reporting at the top of your index.php – Jeemusu Aug 10 '15 at 07:53
  • @Jeemusu i am getting this Object of class Illuminate\\Foundation\\Applicati on could not be converted to string in – Reginwaldt Led Aug 10 '15 at 08:27
  • try setting DocumentRoot var/www/html/kidio/mergeogle/laravel/public @Reginwaldt Led – Tayyab Hussain Aug 10 '15 at 10:29
  • Have you tried reading Apache error log? Open it and check what's on end of file (on ubuntu its usually `/var/log/apache2`) – Volvox Aug 11 '15 at 09:39

1 Answers1

0

There was nothing wrong on my setting the only thing that i did to make it work was

 setenforce = 0

Which i think it might be dangerous at some point .

Reginwaldt Led
  • 369
  • 3
  • 9
  • 19