Sonia
Sonia

Reputation: 11

Localhost refused to connect Xampp issue

i am trying to connect my site from others computers on local network. I can access the site from my system IP address but issue is this when i entered the username and password it will redirect the page from 192.168.0.2/ppp/login to localhost/ppp/auth/login and shows thee error localhost refused to connect.

Upvotes: 0

Views: 11704

Answers (2)

Sonia
Sonia

Reputation: 11

your only need to change the config.php file in controllers. write your IP instead of localhost. Your code will run properly on network.

Upvotes: 0

Moazzam Khan
Moazzam Khan

Reputation: 49

localhost usually points to 127.0.0.1 . So, if you are getting redirected to localhost/login/ppp then the issue with your site's code. Don't redirect to http://localhost/login/ppp. Just do a redirect to /login/ppp instead.

The reason connection is refused is because the other PC doesn't have XAMPP (or any other web server) running on it.

Upvotes: 0

Related Questions