Programmer
Programmer

Reputation: 178

I'm facing problem in laravel that is "This site can’t be reached 127.0.0.1 refused to connect."

I face this error only when "php artisan serve" command is not running. If this command is running then there is no such a error, but as i closed command prompt this error occurs. i have also changed port but no vain. Kindly help me.I would like to mention here that I'm using Window 10 OS. Thanks in advance.

Upvotes: 2

Views: 24025

Answers (4)

OMR
OMR

Reputation: 12208

if you are running a fresh downloaded project , remember to make you own .env file with correct settings

running serve command with no .env file make this error.

Upvotes: 0

Mohammed Abdul Nasser
Mohammed Abdul Nasser

Reputation: 11

If you want a persistent server, you should look into server software like WAMP or XAMPP.

Note that this is expected behavior for the

php artisan serve command

Upvotes: 0

Amel krd
Amel krd

Reputation: 74

because with this kind of server (like: LARAGON), running 'php artisan serve' is necessary, so if you close the terminal, 'php artisan serve' will automaticaly stop running, then the server will stop too, then you can't reach anymore your localhost.

Upvotes: 1

Niraj Shah
Niraj Shah

Reputation: 15457

If you don't have a HTTP server (like WAMP or similar installed), you'll need to keep the Command Prompt / Terminal window running at all times. Closing the window or stopping the php artisan server command will terminate the server that's running the website.

If you want a persistent server, you should look into server software like WAMP or XAMPP.

Note that this is expected behavior for the php artisan serve command.

Upvotes: 3

Related Questions