Cant connect to localhost server

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Cant connect to localhost server

Postby MAW » 12. July 2018 23:29

Im new to xampp and wordpress and have been developing a locally hosted worpresss website.

Everything seems to work when Im at home connected to my local wireless network, however when Im not at home and try to do some work on the website I get an error message...."cannot connect to server at localhost".

Ive checked to make sure: no firewall, ensure theres a network connection etc etc but no joy.

Im suspecting that the issue may be something to do with the wireless network.....but shouldnt any internet connection work? Help
Posts: 1
Joined: 12. July 2018 23:13
XAMPP version: 7.2.7 / PHP 7.2.7
Operating System: Mac OS High Sierra 10.13.5

Re: Cant connect to localhost server

Postby Nobbie » 13. July 2018 10:44

"localhost" is a special servername and does not generally connect to your Xampp Server, but to the current device you are working at. If you enter "localhost" into your smartphones browser (for example), the browser connects to that smartphone (and of course cannot find your Xampp).

Connecting from the internet to your local Xampp PC is not that easy, as your PC probably is connected via a Router to the internet and is assigned a local IP (192.168.*.*) which cannot be accessed from outside. At least you have to establish "port forwarding" in your router (but not ALL routers even support port forwarding) from Port 80 to the LAN IP of your Xampp PC. You should google for some tutorials about routers, "NAT" and Port Forwarding in order to learn, how TCPIP is working and how to connect a local PC to the internet. You CANNOT simply enter "localhost" anywhere in the world and expect your private Xampp PC showing up.
Posts: 10709
Joined: 09. March 2008 13:04

Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 2 guests