Set port for php artisan.php.

How to set up a custom port for a test server?

Usually when we do

php artisan serve 

folder gets:

 localhost:8000 

How can we access one folder as:

 localhost:8080 

I want to access two different development sites on my localhost.

+91
laravel laravel-4
Aug 01 '13 at 9:57 on
source share
7 answers

For port 8080:

  php artisan serve --port=8080 

And if you want to run it on port 80, you probably need sudo:

 sudo php artisan serve --port=80 
+181
Nov 13 '13 at 3:35
source share

like this example you can change ip and port, it works with me

 php artisan serve --host=0.0.0.0 --port=8000 
+16
Apr 18 '17 at 0:28
source share

You can specify the port using: php artisan serve --port=8080 .

+7
Aug 01 '13 at
source share

Andreas's answer above was useful in solving my problem about how to test a craftsman on port 80. You can specify port 80, like other port numbers, but ordinary users do not have permission to run anything on this port.

Drop some common sense and you're done with this for Linux:

 sudo php artisan serve --port=80 

This will allow you to test the local host without specifying a port in your browser. You can also use this to create a temporary demo, as I did.

Keep in mind, however, that the embedded PHP server is not intended for production. Use nginx / Apache for production.

+4
Dec 13 '14 at 21:42
source share

you can use

 php artisan serve --port 80 

Powered by Windows

+3
Apr 14 '17 at 20:54 on
source share

You can use many ports together for each project,

  php artisan serve --port=8000 php artisan serve --port=8001 php artisan serve --port=8002 php artisan serve --port=8003 
+1
Mar 26 '19 at 10:39
source share
  1. List item
  2. List item
  3. List item
  4. List item
  5. List item
  6. List item
  7. List item
  8. List item
  9. List item
  10. List item
  11. List item
  12. List item
  13. List item
  14. List item
  15. List item
  16. List item
  17. List item
  18. List item
  19. List item
  20. List item
-one
Apr 12 '19 at 10:16
source share



All Articles