Jayjay
Jayjay

Reputation: 103

Cannot access laravel project via url http://localhost/myproject/public/

When I ran php artisan serve then copy this URL http://127.0.0.1:8000/. Its works. I want to access my project via url http://localhost/myproject/public/. It returns blank page. And when I inspect the element it returns 500. Internal server error. Appreciate your help regarding this. Thank you.

Laravel version: 5.4

Php Version: 7.1.12

enter image description here

I can access the folders but when accessing the public folder itself. Returns blank page.

enter image description here

When run the php artisan serve. Its working

enter image description here

Upvotes: 2

Views: 4980

Answers (3)

Jayjay
Jayjay

Reputation: 103

I found the answer to my question. It's the PHP version. Php7.0 does not support it

Upvotes: 1

LakiGeri
LakiGeri

Reputation: 2105

Check this answer of my prev. question. You should set symbolic link as the docs said.

Upvotes: 0

Sapnesh Naik
Sapnesh Naik

Reputation: 11636

You can try doing:

composer install

Or In the root of your project try to run

php -S localhost:8000 -t public/  

Upvotes: 0

Related Questions