Feisty, can't connect to localhost

Dan Stieg dan.stieg at gmail.com
Sun Jul 22 16:17:16 UTC 2007


On Sat, 2007-07-21 at 22:44 +0200, Nils Kassube wrote:
> Dan Stieg wrote:
> > I am trying to set up apache. I installed both apache and apache2 and
> > am unable to connect to localhost through Firefox or telnet. I added
> > port 80 to iptables. sudo telnet localhost gives:
> >
> > Trying 127.0.0.1...
> > telnet: Unable to connect to remote host: Connection refused
> 
> Depending on the port you want to connect there must be a server 
> listening. If you want to connect to your apache on port 80 you should 
> first check, if there is a service listening on port 80:
> 
> netstat -tan | grep 80
> 
> The output should look like this:
> 
> tcp  0 0 0.0.0.0:80  0.0.0.0:*  LISTEN
> 
> If it isn't running, you should first find out what's wrong with it. If 
> you can see there is a server listening, you can type
> 
> telnet localhost 80
> 
> to test the connection to your apache. Or you could just connect with your 
> browser to <http://localhost>.
> 
> BTW: With the command you mentioned, telnet tried to connect to the 
> standard port for telnet (23), but you should not have a telnetd running. 
> And you don't need sudo to start telnet -- but it doesn't hurt :)
> 
> 
> Nils
> 
No service was running, I thought Apache was started at install. I
started it and it works now.
Thanks for the info on telnet.

Dan





More information about the ubuntu-users mailing list