Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

djarrin's avatar

File not found. when launching application to a real server

I am attempting to launch a Laravel application to a real server. I have the home path just set up like how it comes out of the box (a route pointing to Laravel Welcome page). All of that seems to work on my homestead machine but when I deploy to the real server, run composer install then go to the front page I just get the message "File not found."

I'm sure this is a pretty common issue (I'm just missing some steps) if some one could point me in the right direction...

0 likes
4 replies
vladislavsavage's avatar

Have you moved your app key from .env to config/app.php?

it should look like

    'key' => env('APP_KEY', 'some-symbols-here'),
djarrin's avatar

Shouldn't it just be picked up from my .env file (what ever is labeled APP_KEY)

Snapey's avatar

You need to check that the document root of the web server points to your public folder

djarrin's avatar

I was actually in the process of replacing a domain that had wordpress on it with a Laravel project. Talking to my server guy it looked like there was indeed a .htaccess file issue which sorta fixed the issue.... for the most part, I still had to create some directories in the storage directory and clear cache.... Is there a better way to do this, like using the Laravel installer on the server itself, rather than how I did it which was use Laravel installer on my local machine then just push up to the server via bamboo, which excludes all of the directories in the .gitignore file.

Please or to participate in this conversation.