Laravel serve getting ERR_CONNECTION_REFUSED on localhost Laravel serve getting ERR_CONNECTION_REFUSED on localhost apache apache

Laravel serve getting ERR_CONNECTION_REFUSED on localhost


I found the answer: artisan serve isolates the host, so if I want to specify it, I need to do:

php artisan serve --host=127.0.0.1


php artisan serve :

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

so you can only access to this server by http://localhost:8000/


Depending on what project you may in! In our case we had a bought project!And https is configured by default! So https://..../app.css will not be accessible!

When you visit the link again in chrome it switch to http://.../app.css and it will work!

For our bought base code an env variable was setup and i just disabled it as bellow:enter image description here

You may like to disable it in development!

This link may be helpful too!

How to force Laravel Project to use HTTPS for all routes?

Otherwise you can setup https to work well! Check how to do that with apache! Or nginx !

Otherwise know that you can't do it with php artisan serve! And you'll need to disable force https!

See the option bellow! (check the first answer to see if you can still use php artisan serve! And read the second one! To get why php artisan serve doesn't support https)

Laravel php artisan serve to mimic HTTPS

I hope this may help some! That fall on the same problem! Which is a line of things to check to add to the list here!