Reputation: 339
In Laravel 5.4,
After running php artisan serve command fresh laravel setup works on this url localhost:8000
but when i try to access with public url localhost/lara54/public
. it is not working and gives white blank page. I tried this using virtual host in linux giving folder path upto public but still not working.
php artisan serve command also creates a virtual host what i am missing here to make this setup work with URL.
Upvotes: 5
Views: 14158
Reputation:
The default Laravel command "php artisan server
" returns the URL "localhost:8000" in your browser address bar, so you should type "http://localhost:8000".
Because it uses the default PHP built-in web server (read at PHP.net) to serve the Laravel application direcory for development.
For production, it is recommended to use nginx or Apache, you may read on DigitalOcean for Nginx or for Apache
Upvotes: 0
Reputation: 1
It's a matter of fact that serve command and run with public folder give url not found error. There are three ways
<a href="{{ url('/dashboard') }}">
<Directory /var/www/html/public/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Upvotes: 0
Reputation: 100
I just got inspired by user4535674's and Bercove's answers.
Instead of
php artisan serve --port=8000
type
php artisan serve --host=0.0.0.0 --port=8000
It worked in my case like a charm!
Upvotes: 1
Reputation: 1912
Try using the following --port param:
php artisan serve --port=8000
Hope it helps you because this solves my problem.
Upvotes: 1
Reputation: 1028
give permission to following two directories:
storage
bootstrap/cache
i hope its help you
Upvotes: 1