I have also added the environment variables.
New installation but see nothing but 404 error
Sorry for being such a Noob, but I am kind of stuck. I have a brand new installation of Laravel 5.1 on forge and digitalocean. The database is in place and I can see it through ssh. I can also see all of the files on my site through ssh. Why is it that I cannot see it in the browser using the IP address? I have tried many different combinations for the URL, but nothing shows other than the 404 error. Thank you
DNS cache? Did you set it up so that your project points to the public directory? I'm also using Forge and Digital ocean.
Try changing your DNS to use Google's which are 8.8.8.8 and 8.8.4.4.
Check your DNS using: https://www.whatsmydns.net and http://propagatedyet.com
- Check your
routes.phpfile, are you hitting the correct route? - Check your deployment log:

So, just to be clear this is a fresh installation. According to the Laracast lessons, I am seeing that it should go straight to a Laravel landing page on installation. I am also visiting only the IP address. Do I still need to make changes to the DNS?
No I mean your DNS, sometimes you can have caching issues with your ISP, so you can use Google's DNS servers instead of theirs.
Can you paste your latest deployment log as I mentioned above.
From github.com:<github/repo>
- branch master -> FETCH_HEAD Already up-to-date. Loading composer repositories with package information Installing dependencies from lock file Nothing to install or update Generating autoload files Generating optimized class loader Compiling common classes Migration table created successfully. Migrated: 2014_1012000000_create_users_table Migrated: 2014_10_12_100000_create_password_resets_table
Sounds like the mapping is wrong and Nginx can't find the files you requested? 404 means not found.
Post the setup of your files and your Nginx virtualhost config.
@rpombo that looks fine to me, chances are it how you have set up the domain. You probably missed a step or something when going through the tutorial.
This is a new installation. The files are exactly as they come out of the box with nothing changed. The server is exactly as Forge sets it during a new user installation. Nothing has been added or modified.
I am in the process of downloading a new copy of Laravel and reinstalling everything. I think that it must just be a file corruption.
@rpombo if everything was fine then you wouldn't be getting a 404. If you haven't modified anything then I suggest starting the process again.
Well a reload of all of the files was not enough. I had to delete the database and the server and start from scratch. I am still not happy with it, but at least I am getting to the index.php page. Now I just have an "Whoops..." error. I will see what I can do to hunt this down.
@rpombo you can temporarily turn on debugging by setting an environment variable. Then show us the error message if you are unable to solve it yourself. Also, showing us your routes.php file and any appropriate Controllers always helps.
Unless there is a problem with the download, then all routes and controllers are exactly as they were straight from Laravel. I have not modified these in any way. Thank you for your help though.
RuntimeException in compiled.php line 6904: No supported encrypter found. The cipher and / or key length are invalid.
in compiled.php line 6904
at EncryptionServiceProvider->Illuminate\Encryption\{closure}(object(Application), array()) in compiled.php line 1057
at Container->build(object(Closure), array()) in compiled.php line 1010
at Container->make('encrypter', array()) in compiled.php line 1536
at Application->make('Illuminate\Contracts\Encryption\Encrypter') in compiled.php line 1102
at Container->resolveClass(object(ReflectionParameter)) in compiled.php line 1086
at Container->getDependencies(array(object(ReflectionParameter)), array()) in compiled.php line 1072
at Container->build('App\Http\Middleware\EncryptCookies', array()) in compiled.php line 1010
at Container->make('App\Http\Middleware\EncryptCookies', array()) in compiled.php line 1536
at Application->make('App\Http\Middleware\EncryptCookies') in compiled.php line 9384
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2656
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9384
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9374
at Pipeline->then(object(Closure)) in compiled.php line 1997
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 1983
at Kernel->handle(object(Request)) in index.php line 55
@rpombo for starters here is why I ask about your routes.php and Controllers. It gives us an idea of what we are dealing with. Secondly (and quite important) is that most development machines (your Windows PC and Mac are case-insensitive) whereas your production environment will most likely be case-sensitive. So your routes.php file, Controllers and Models must have the correct names.
By turning on debugging (if you are reluctant to share any information with us) is going to be your only way to get to the bottom of it.
@rpombo it looks like you haven't added your APP_KEY to Forge.
Make sure you have run php artisan key:generate and in config\app.php change:
'cipher' => 'whatever it is' to 'cipher' => 'AES-256-CBC'`
Check this thread on the Laravel.io forum.
I don't mind sharing the code at all. It is freely available to anyone. Here is the routes file.
/* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the controller to call when that URI is requested. | */Route::get('/', function () { return view('welcome'); });
@rpombo, follow that @mstnorris said.
You need also to add the environment variable.
The installation has three controllers. Which would you like to see? Controller.php, Auth/AuthController.php, Auth/PasswordController.php ?
Where is the App_Key found?
@rpombo you need to run php artisan key:generate and then it is stored in your .env file. Copy it to Forge:
Key is "APP_KEY" and Value is the key that is generated by the command php artisan key:generate.

That did the job. Thank you so much for being so patient with me and walking me through this. You, @mstnorris , are awesome!
Thank you to everyone that chimed in on this. I hope that this thread can help another newbie. I did not see this in the tutorials, but I must have just missed that step.
A quick search through the forum shows that many others have missed the same thing. Maybe this needs to be made a little more clear in the installation instructions. IMHO
@rpombo I agree and disagree. You have to copy your Database environment variables, as well as other services you use, Redis. Mail drivers etc. Your APP_KEY is vital as it is used for encryption, so that too (of course) needs to be added as well.
I know it may not seem obvious, but it is. ;) Basically, everything in your .env file should be transferred across.
Oh these were transferred across just fine. It must have been an old key though because I needed to regenerate it in order for it to work correctly. Since I just reinstalled all files, I am thinking that it did not get updated correctly. Thanks again.
Please or to participate in this conversation.