Why can't I connect to http://localhost or http://127.0.0.1

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

Why can't I connect to http://localhost or http://127.0.0.1

Postby Advice Pro » 27. November 2008 23:41

Also, why are at the service settings in my XAMPP control panel application set like this:

Image

what am I doing wrong, since I took this screenshot I ran Apache as a service!
Luis Arturo Pina III
Advice Pro
 
Posts: 6
Joined: 19. November 2008 17:43

Postby JonNielsen » 28. November 2008 02:26

For me, the controle panel (the screenshot you are showing) are utterly bugged. Just use the .bat-files in the xampp-directory.

apache_start.bat to start the apache :). That's what i do.
JonNielsen
 
Posts: 19
Joined: 13. November 2008 06:09

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby LooseCannon » 05. December 2008 10:10

I've had no problems with the control panel. Not to say at all that JonNielsen's not justified in his opinion. :)

"Post subject: Why can't I connect to http://localhost or http://127.0.0.1"

Please give us some background info, like what exactly you're doing and what happens, eg error messages.

Or maybe you're fixed now?
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby Kamo » 20. December 2008 11:05

Since he dind't post anything i will.

I never had any problems with xampp untill yesterday when i installed it.

After installing (C:/xampp) and setupping i use xampp control panel as it's the easiest way. I don't have any errors in control panel before and after launching apache. The thing is. In any browser when im trying to view any page on localhost it just stay there with waiting for reply message. Nothing else like something was blocking it. I don't have any firewall running. Port check gives all free ports messages.
I'm in need of http+php and later mysql service and can't achieve it now. But when i launch other http service like free "http file server" it works like a charm. What can be wrong. In error.log i don't have anything wrong - well there is one warning ..

Code: Select all
[Sat Dec 20 11:01:04 2008] [warn] pid file c:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Dec 20 11:01:06 2008] [notice] Apache/2.2.9 (Win32) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.6 configured -- resuming normal operations
[Sat Dec 20 11:01:06 2008] [notice] Server built: Jun 14 2008 19:02:12
[Sat Dec 20 11:01:06 2008] [notice] Parent: Created child process 744
[Sat Dec 20 11:01:07 2008] [notice] Child 744: Child process is running
[Sat Dec 20 11:01:07 2008] [notice] Child 744: Acquired the start mutex.
[Sat Dec 20 11:01:07 2008] [notice] Child 744: Starting 250 worker threads.
[Sat Dec 20 11:01:07 2008] [notice] Child 744: Starting thread to listen on port 443.
[Sat Dec 20 11:01:07 2008] [notice] Child 744: Starting thread to listen on port 80.


Here's what's other proggy tells my abut apache. All seems o k but i never got to the page i was looking for.
Image
User avatar
Kamo
 
Posts: 3
Joined: 20. December 2008 10:37
Location: Poland

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby Sharley » 20. December 2008 11:10

Did you try http://127.0.0.1 instead of http://localhost

If using the IP works but not the localhost name then drag the HOSTS file into a text editor
C:\WINDOWS\system32\drivers\etc\HOSTS
Then add comments in front of this line so it looks like this (if you have this line)
# ::1 localhost

If you get the same result with the IP and the localhost name then add this:
Win32DisableAcceptEx
to your httpd.conf file as the last line in the file.
Save the file and restart Apache.
Last edited by Sharley on 20. December 2008 11:20, edited 1 time in total.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby Kamo » 20. December 2008 11:19

Yup just now same thing.. waiting for reply.
User avatar
Kamo
 
Posts: 3
Joined: 20. December 2008 10:37
Location: Poland

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby Sharley » 20. December 2008 11:22

Check my edits in the previous post. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby Kamo » 20. December 2008 11:35

You sir are a Genius!

Thank You now it works again :D :D :D

2nd suggestion did it for me :)


Merry Christmas :)
User avatar
Kamo
 
Posts: 3
Joined: 20. December 2008 10:37
Location: Poland

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby Sharley » 20. December 2008 11:49

Kamo wrote:2nd suggestion did it for me
Merry Christmas

That's good it worked - always good to know the outcome.

Seasons Greetings :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby ankur.vyas » 28. December 2008 09:55

How did you post the image in your posting? Thanks in advance.
ankur.vyas
 
Posts: 6
Joined: 28. December 2008 07:20

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby LooseCannon » 02. January 2009 11:55

ankur.vyas wrote:How did you post the image in your posting? Thanks in advance.
Off topic, but a good question that could help many. Often nice to see a screenshot or image to help explain an issue.

Put a link to an image inside the image tags. Example per Kamo's post above:

Image, already uploaded to some online space that Kamo has:
http://kamo.4ignition.com/inne/http.jpg

Image tags, themselves put in Code tags so they show:
Code: Select all
[img][/img]

Shown here complete, and again put in Code tags, else just the image would appear:
Code: Select all
[img]http://kamo.4ignition.com/inne/http.jpg[/img]

Tip: copy/paste the link to the image, highlight it with the mouse and click the "Img" button above the post edit window. That puts the img tags before and after what you've highlighted.

General note: consider the size/scale of the image.
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby manna1111 » 06. January 2009 01:42

Sharley wrote:Did you try http://127.0.0.1 instead of http://localhost

If using the IP works but not the localhost name then drag the HOSTS file into a text editor
C:\WINDOWS\system32\drivers\etc\HOSTS
Then add comments in front of this line so it looks like this (if you have this line)
# ::1 localhost

If you get the same result with the IP and the localhost name then add this:
Win32DisableAcceptEx
to your httpd.conf file as the last line in the file.
Save the file and restart Apache.


I also have the same problem not being able to open localhost. I tried to follow your instructions I have gone to c:\WINDOWS\system32\drivers\ however there is not a folder "etc" or "hosts". It is c:\WINDOWS\system32\drivers\ intel . Also there is nothing in the "intel" folder. I did a search for httpd.conf but it is not found.

When i try to axxess "localhost" it will redirect me to the xampp homepage. Also, This is what comes up for me when I try to axxess http://127.0.0.1:
There is a problem with this website's security certificate.


The security certificate presented by this website was not issued by a trusted certificate authority.
The security certificate presented by this website has expired or is not yet valid.
The security certificate presented by this website was issued for a different website's address.

Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.
We recommend that you close this webpage and do not continue to this website.
Click here to close this webpage.
Continue to this website (not recommended).
More information


If you arrived at this page by clicking a link, check the website address in the address bar to be sure that it is the address you were expecting.
When going to a website with an address such as https://example.com, try adding the 'www' to the address, https://www.example.com.
If you choose to ignore this error and continue, do not enter private information into the website.

For more information, see "Certificate Errors" in Internet Explorer Help.


Do you have any suggestions. I am stumbling through learning this process:) Thanks for these forums
manna1111
 
Posts: 8
Joined: 06. January 2009 01:29

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby Sharley » 06. January 2009 02:30

Are you logged into Vista as an Administrator?

The etc folder has to be there, so another thing to check is that you have allowed seeing system files and folders - Control Panel>Folder Options>View> tick the box Display the contents of system folders> click OK.

The certificate is fine and the message is a standard response for self signed certificates which is the case for XAMPP.

If possible simply accept and store the certificate as normal.

Google and our Forum Search facility will save you much time and they are your best friends. ;)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby manna1111 » 06. January 2009 02:40

I am an administrator on my WIndows XP. I do not have vista. Could that be why I do not have the "etc" folder? if not are you able to tell me were to find it on windows xp?

HOw do I accept the security certificate so that I am allowed axxess to locoalhost? I have clicked to "go to site anyway" however, I am still automatically reverted to the xampp homepage. Is this correct?
manna1111
 
Posts: 8
Joined: 06. January 2009 01:29

Re: Why can't I connect to http://localhost or http://127.0.0.1

Postby Sharley » 06. January 2009 03:06

manna1111 wrote:I am an administrator on my WIndows XP. I do not have vista. Could that be why I do not have the "etc" folder? if not are you able to tell me were to find it on windows xp?
Sharley wrote:The etc folder has to be there, so another thing to check is that you have allowed seeing system files and folders - Control Panel>Folder Options>View> tick the box Display the contents of system folders> click OK.
Amanda, this applies to XP, did you follow those instructions?


manna1111 wrote:HOw do I accept the security certificate so that I am allowed axxess to locoalhost? I have clicked to "go to site anyway" however, I am still automatically reverted to the xampp homepage. Is this correct?
I don't have IE so that will be your job to find out how to accept a certificate, if that is at all possible, in IE.

Http://localhost and http://127.0.0.1 should both go to the XAMPP Welcome page in a default XAMPP installation.

https://localhost and https://127.0.0.1 should both go to the XAMPP Welcome page in a default XAMPP installation but using the Secure Socket Layer (SSL).

There have been some issues with the installer version of XAMPP 1.7.0 in XP that have been fixed by doing a full uninstall of XAMPP then a reinstall either with the installer version again or using the zip or my preferred version the 7zip self extracting exe file.

There are a few very recent posts that relate to this installer version issue on XP, here's just one of them:
http://community.apachefriends.org/f/viewtopic.php?f=16&t=32658
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 175 guests