5

I am using Ubuntu 14.04 and I am trying to install Laravel framework. In this purpose I have run this code in terminal:

php artisan serve

After waiting for 4-5 minutes I got this response:

Laravel development server started on http://localhost:8000/

[Tue May 26 13:19:40 2015] 127.0.0.1:44800 [200]: /favicon.ico

[Tue May 26 13:19:40 2015] 127.0.0.1:44801 [200]: /favicon.ico

After waiting for more than 10 minutes I got no more response although terminal is working.

Does it really take that much time? Or what's wrong?

Nhan
  • 3,595
  • 6
  • 30
  • 38
partho
  • 1,101
  • 2
  • 21
  • 37
  • Is the script constantly needing to run in background in order for laravel server to be running/available? If so, you don't want it to exit, but you may want to have it run in the background or as a service. – Anthony May 26 '15 at 07:50
  • does your laravel application also takes long to load? – Emeka Mbah May 26 '15 at 07:53
  • 1
    Usually when a server takes too long to start - it's either a DNS problem (trying to resolve own name) or `SO_REUSEADDR` option is missing when trying to bind to a listening socket (a port). – Alexander Farber May 26 '15 at 07:54
  • no, laravel is not running – partho May 26 '15 at 07:54
  • then, what can I do? although port 8000 has been started, http://localhost:8000/ shows that, Sorry, the page you are looking for could not be found. – partho May 26 '15 at 07:56
  • You need to stop the server and run this command which specifies the public directory `php -S localhost:8000 -t public/` as the root document root – Emeka Mbah May 26 '15 at 07:59
  • you can also cd into your `laravelProject/public` then `php -S localhost:8000` – Emeka Mbah May 26 '15 at 08:01
  • good. please confirm if it took long? is the starting processing still slow? – Emeka Mbah May 26 '15 at 08:40
  • its working well, but i need to run treminal in background, if i exit terminal, port 8000 is automatically stopped, do i need to run it in background? – partho May 26 '15 at 09:08

1 Answers1

4

then, what can I do? although port 8000 has been started, localhost:8000 shows that, Sorry, the page you are looking for could not be found.

You need to stop the server and run this command which specifies the public directory php -S localhost:8000 -t public/ as the root document root

or
you can also cd into your laravelProject/public then php -S localhost:8000

Emeka Mbah
  • 16,745
  • 10
  • 77
  • 96