cannot connect to localhost

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

cannot connect to localhost

Postby lollylegs » 28. November 2012 19:40

:mrgreen: I have tried for days to get xampp to connect to localhost.
1. xampp installs perfectly.
2. netstats -anltp | grep "LISTEN" shows apache listening on 80
3. Disabled firewall
But when I type http://localhost all I get is a google page of localhost listings instead of 'IT WORKS' or the Xampp Welcome Page.
What am I doing wrong please
Would appreciate any help
Regards Marea (Australia)
lollylegs
 
Posts: 3
Joined: 28. November 2012 19:06
Operating System: ubuntu 12.10

Re: cannot connect to localhost

Postby WilliL » 28. November 2012 21:01

Hi,
does a call in Browser '127.0.0.1' instead of 'localhost' work?

check hosts file ( c:\windows\system32\drivers\etc\HOSTS)
there should be a line like:
127.0.0.1 localhost

maybe its commented out by a '#'
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: cannot connect to localhost

Postby lollylegs » 29. November 2012 00:03

Hi WilliL
Thanks for replying
I have tried 127.0.0.1 same thing
I am new to ubuntu and have tried to find "HOST" file there to no avail
I have also changed ServerName in httpd.conf to localhost:80 hoping it would make a difference
lollylegs
 
Posts: 3
Joined: 28. November 2012 19:06
Operating System: ubuntu 12.10

Re: cannot connect to localhost

Postby JonB » 29. November 2012 01:05

The firewall (assuming iptables) should make no difference AFAIK.

You should use su or sudo for these explorations:

A. - have you looked in the Apache error log? (opt/lampp/logs/error_log)

B. - the hosts file is found in the root of the filesystem under /etc usually.
This should let you take a look - (or you can use an editor if you want to make changes)

Code: Select all
cd /etc
cat hosts


C. - you may want to try a different browser (or turn off the Google browser suggestions) so you can get to the 'real error message' whihc might be a 403 or 404.
Depending on the linux desktop installed you might have Firefox or Konqueror available. In Google Settings > Advanced, these are what you want to turn off to keep Larry & Sergey from making you nuts when debugging:

Use a web service to help resolve navigation errors
Use a prediction service to help complete searches and URLs typed in the address bar


D. Although the 'It Works' looks promising, you should be re-directed to the XAMPP Welcome Page when XAMPP/lampp is working correctly.

E. Is the owner of the /opt/lampp hierarchy nobody:root? If its root:root, your logged in Linux user will pull a 403 or 404 usually.

Good Luck with XAMPP -
:)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 24 guests