简体   繁体   中英

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM