How to run laravel 5 on port 80 localhost?

For previous versions of Laravel, you can simply download laravel using composer in the root folder of your Apache server and enter http://localhost/public/ to see the "You arrived" home page.

I know that I can use php artisan serve to view the Laravel5 homepage by default, but it runs on localhost:8000 and I heard that the php artisan serve command should not be used in a production environment due to connection limitations and poor performance. Is there a way to see the default homepage without using the php artisan serve command?

And it's really frustrating that Laravel doesn't include such a simple thing in its installation documentation ...

+7
source share
2 answers

To start the service on another port, you need to pass port parameter port number using this code in cmd:

 php artisan serve --port=80 

To run through port 80 you may need administrator permission.

+12
source

You may need to use the sudo command for administrative privileges.

 sudo php artisan serve --port=80 
+2
source

Source: https://habr.com/ru/post/985021/


All Articles