'Authentication Issue [access to localhost website works on mac - however, I cannot access from another device on same network]?
I have developed a web app which has a simple authentication to log in to the rest of the site. When I test functionality directly on the localhost (Mac Computer) it works as expected however, when I try and access this through my phone or another laptop (on the same network) - I can access the index.php [home page] and I am asked to authenticate however, when input the username and password, I get the ERR_Connection Refused Message. Why?
When I input the incorrect username and password, it confirms that I have input the wrong details so, the code is working but I have hit a wall in understanding why on my mobile device or even another pc, I'm unable to authenticate into the site - when I can on my Mac (where the site sits on localhost.
Finally, all devices are on the same network.
Sorry in advance for what I assume is quite a basic question!
Solution 1:[1]
For any one else that happens to stumble across this post with a similar issue, I have resolved this after further investigation and head scratching. Basically, the ERR_CONNECTION_REFUSED means the requesting page is not available on my phone or any other device.
In other words, it is a linking issue.
As my Mac has no such issue, that means the link is available on my Mac.
In short, I had an incorrect absolute link in the code when a relative link was expected. I changed this and hey presto - the code worked.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | gndulor |
