'unable to connect to XAMPP server on localhost

I installed XAMPP server in a local disk E which is not containing the windows OS ,and start Apache and MySQl with out any errors .But when I try connect to my localhost this error appear "Unable to connect" and I'm sure that there is an internet connection.

what will be the problem then ?

ُEDIT:SOLUTION: the idea was I'm change the port number of XAMPP server from 80 to 90 ,so I should implement than when I call the local host like this http://localhost:90



Solution 1:[1]

Have you restarted the server and tried it again. EDIT: You should not change the port number and skype(correct me if I am wrong) does not use port number 80 .Port number 80 is for Http Requests. XAMPP sends HTTP request to port number 80 of localhost which is the dafault port number used when you try to access a web server from a browser. So change back the port number to 80 or try http://localhost:90 in the webbrowser

Solution 2:[2]

if you want to run apache on other port you should to edit your httpd.conf
find line 'Listen 80' and change 80 to your port.
then restart Apache service and enjoy browsing ...

Solution 3:[3]

I had the same issue after I changed the port to 8080. I couldn't connect to localhost. Instead of just saying http://localhost/, you say http://localhost:8080/. it should be fine

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
Solution 2 Farrokh
Solution 3 MoKG