Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel - how to serve laravel project with https on local development

I googled a lot about solution to serve with https. Even I tried ngrok, but it doesn't work properly. Below is the code of ngork.

php artisan serve
cd <path-to-ngrok>
./ngrok http localhost:8000

I am sure Laravel has artisan to serve HTTPS.

like image 318
Cesar L. Avatar asked Oct 16 '25 06:10

Cesar L.


1 Answers

One solution is to use Symfony's 'serve' command instead of artisan serve.

https://symfony.com/download

Install the Symfony CLI locally (I used the homebrew install instructions) and then ran symfony serve in my Laravel root dir. This serves the site under https by default.

like image 153
Andrew McCombe Avatar answered Oct 19 '25 00:10

Andrew McCombe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!