Is it possible to use Ip address instead of localhost in laravel?

I used to deploy my laravel app to server. Is there a way to change localhost: 8000 in the ip of the remote machine or is it possible to change the port number 8000 to 80?


source to share

2 answers

To make it work outside of localhost, run php artisan serve --host xxxx

If you want it to work without specifying a port in the browser, php artisan serves as --host xxxx --port 80. sudo is most likely required for Mac.

Note. Php artisan service should never be used for production. It is for developers and demos only and will not be able to handle more than one person or two traffic.



I'm not really sure what you mean, but you cannot point localhost to the remote ip.



All Articles