Laravel / Document root : getting a blank page

March 23, 2015 3.3k views
Nginx PHP Frameworks

I'm running Ubuntu 14.04 x64 and nginx

I had a basic laravel project working. The following line in the server {} block of my /etc/nginx/sites-available/default file worked to get it to load in the browser at my IP address.

root /usr/share/nginx/html/laravel/public;

I made a new project, again Laraval 5 with only some basic CSS and a template added and I cloned it to /usr/share/nginx/html/new and I changed the document root line to

root /usr/share/nginx/html/new/public;

It doesn't work. The file structure is exactly the same as the original laravel directory so I don't understand why. I changed the document root back to the original directory, restarted nginx and the original site worked again. I deleted the original directory, renamed the 'new' one to 'laravel' but that doesn't work either. The directory structure now is the same as it was originally. The laravel project works locally on my home computer so I don't think the problem is broken code or anything like that.

Can anyone advise? I forget if I had to do anything special setting up the original project and I'm new to nginx and all this stuff...


  • If you turn on debugging with laravel, will it at least generate an error of some sort? What i've found with Laravel is I always have to set the permissions to the app/storage (laravel 4) manually. I am assuming you did that already?

    Try hosting it like php artisan serve --host

    This will open it up public so you can access it via IP:8000 just for testing purposes. Not recommended to keep enabled, obviously!

  • Thanks for that and sorry for the lack of appreciation! I reset the whole thing in the end. I'll probably run into this issue again when I've got my head around connecting to mysql...

Be the first one to answer this question.