localhost only works when using port

Problems with the Windows version of XAMPP, questions, comments, and anything related.

localhost only works when using port

Postby chuckd83 » 13. August 2018 14:41

Hi all,

I am trying to host my own website from a home server for my small business. I have installed xampp in order to use Word Press. I followed a tutorial and everything is working except when I go to "localhost" I receive "This site can't be reached". However, when I go to "localhost:7070" (the port I'm using), it works. Thanks for any help.
chuckd83
 
Posts: 2
Joined: 13. August 2018 14:37
XAMPP version: 3.2.2
Operating System: Windows 7

Re: localhost only works when using port

Postby Altrea » 14. August 2018 06:37

You can only omit the port in the URL if you use the default port specified for this protocol.
So, if you use port 80 to use for HTTP, you can omit it, otherwise not.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: localhost only works when using port

Postby Nobbie » 14. August 2018 10:45

In short: http://localhost:80 is identical to http://localhost and https://localhost:443 is identical to https://localhost

But http://localhost:7070 is http://localhost:7070, there is no way to leave out the portnumber.

That is one of many reasons why we strongly do NOT recommend to change http and https ports in Apache setup, as these are the default ports for http and https. Obviously, you changed the setup, why did you do so?
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: localhost only works when using port

Postby chuckd83 » 14. August 2018 14:47

Thanks all. I was following a tutorial and the person changed the port. I'm not sure why. This is all new to me.
chuckd83
 
Posts: 2
Joined: 13. August 2018 14:37
XAMPP version: 3.2.2
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 151 guests