Unable to connect to localhost in browser after installing XAMPP successfully
31,722
According to the output of netstat
, the Apache webserver fails to open the listening port. You should download the newest version of XAMPP and follow the instructions on the site.
If XAMPP is ran with default configuration, the output should look something like this:
whisperity@localdomain:~$ sudo netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 5235/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5701/httpd
tcp6 0 0 :::21 :::* LISTEN 22965/proftpd: (acc
Related videos on Youtube
Author by
claudia
Updated on September 18, 2022Comments
-
claudia over 1 year
I have successfully installed XAMPP 1.5.3 following this guide on Ubuntu 12.04 and it started with no errors.
$ sudo /opt/lampp/lampp start Starting XAMPP for Linux 1.5.3a... XAMPP: Starting Apache with SSL (and PHP5)... XAMPP: Starting MySQL... XAMPP: Starting ProFTPD... XAMPP for Linux started.
But when I open
http://localhost/
orhttp://127.0.0.1/
in Firefox I get the Unable to connect error.After I turned out to be unsuccessful, I changed the port in
httpd.conf
as described here from80
to81
and attempted to openhttp://localhost:81/
andhttp://127.0.0.1:81/
, but I got the same result.Edit
The output of
netstat -tlnp
:Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 23369/mysqld tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 23352/proftpd: (acc tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 20196/dnsmasq tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 929/cupsd tcp6 0 0 ::1:631 :::* LISTEN 929/cupsd tcp6 0 0 ::1:44166 :::* LISTEN 23848/java
-
Achim A almost 12 yearswhat about localhost/xampp ?
-
Eric Carvalho almost 12 yearsPlease post the output of
sudo netstat -tlnp
so we can see the open ports. -
damien almost 12 yearsYou are using a very old version of xampp its up to version 1.8.0 now.
http://localhost
should be all thats needed from default web browser -
claudia almost 12 yearsi realised the oldness of it after i installed (just copy pasted the instructions). i need it to do some quick testing on a web app i'm working on, but if no quick fix is to be found i will try to upgrade and see if that does it. still... i found it to be an issue an just in case it may occur later again, is good to learn a few extra things.
-
claudia almost 12 years@user60333 yes, i did test the localhost/xampp/index.php and 127.0.0.1/xampp/index.php
-
-
claudia almost 12 yearsi'm giving it a try and will let you know. thanks a lot
-
claudia almost 12 yearsI'm having trouble downloading the latest version (poor connection), and i'm trying another way since that's waht i'm really interested in.
-
Whisperity almost 12 years@claudia The problem is with Apache's configuration (that's why the listener daemon does not start) files (
/opt/lampp/etc/httpd.conf
and/opt/lampp/etc/extra/httpd-*.conf
), not PHP. -
Eliah Kagan almost 12 yearsWelcome to Ask Ubuntu! These appear to be instructions to fix a similar problem on Windows rather than this problem on Ubuntu. If that is not the case, I recommend copy-editing this post for grammar and sentence structure to clarify what exactly you are recommending.