Run laravel project in localhost

雨燕双飞 提交于 2019-12-04 09:47:38
Naincy

Try to run in different port

php artisan serve --port=9000

and then try http://127.0.0.1:9000 will work.

As might be on port 8000 something already running on your system will not make it work.

And you can also run your laravel project without artisan serve command

If anyone wants to make the application public, the more easy and fastest way is:

  1. Rename the "server.php" file in root directory, in "index.php"
  2. Move your .htaccess from public folder to root directory
  3. Make your directory accessible to Apache2 (set all file permissions to 777).

At starting level, you can use url like this http://127.0.0.1:8000 with port-number. but in further level you must working with simple url like http://localhost/laravel/public/. One more thing - you should remove "public" keyword from url, so you access direct your root-project. Review this link - Laravel 5 - Remove public from URL

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!