You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by kloomis <kl...@it-resources.com> on 2005/10/06 16:31:21 UTC

[users@httpd] Lost connection to localhost

Hello:

I had everything working well on Fedora Core 3 and Apache 2.0.52. Then I 
tried to set up two virtual hosts without success.  When I rebooted the 
machine the next day, I had lost my connection to localhost and I cannot 
get it back.
I can ping localhost on the local machine but I cannot reach it via the 
browser.  I get the error "The connection was refused when attempting to 
contact localhost."

This is the same whether the firewall is enabled or not.

I have tried various host configs including:

127.0.0.1 myDomain.com localhost.localdomain localhost asus

and
127.0.0.1 localhost.localdomain localhost asus

and
127.0.0.1 localhost.localdomain localhost asus
192.168.1.108 myDomain.com

and
192.168.1.108 myDomain.com
127.0.0.1 localhost.localdomain localhost asus

before it failed the first of these was the best performing.

I have tried various addresses for the httpd.conf file, using myDomain.com 
and 192.168.1.108 in the directives for server name and listen, 
NameVirtualHost and VirtualHost, appending the port :80.

Does anyone have any idea why I cannot get to localhost from my browser, or 
why for that matter the machine cannot connect to mySQL thru localhost?

Thanks,

Ken

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Lost connection to localhost

Posted by kloomis <kl...@it-resources.com>.
I wrote:

>Also, a curiosity, if I replace the index.php with index.html (a simple 
>hello file), I get the Apache Test Page.  Shouldn't I get "Hello"?  If I 
>type myDomain.com/index.html I get "Hello."

and I ask:

Maybe Directory Index in .htaccess overides DirectoryIndex in httpd.conf?

Ken




Re: [users@httpd] Lost connection to localhost

Posted by kloomis <kl...@it-resources.com>.
At 10:37 AM 10/6/2005 -0400, you wrote:
>On 10/6/05, kloomis <kl...@it-resources.com> wrote:
> > I have tried various addresses for the httpd.conf file, using myDomain.com
> > and 192.168.1.108 in the directives for server name and listen,
> > NameVirtualHost and VirtualHost, appending the port :80.
> >
> > Does anyone have any idea why I cannot get to localhost from my browser, or
> > why for that matter the machine cannot connect to mySQL thru localhost?
>
>Use just
>Listen 80
>in httpd.conf and *no other Listen directives*.

Joshua:

OK, that was good. Thank you!!!

Now I get "Access denied for user 'krwl@localhost' (Using password: YES)"

Which is where I was when I originally tried to back off my 
VirtualHosts.  I believe this is php trying to get to mySQL.  Any idea why 
this would suddenly stop working? (I thought it had to do with my machine 
not seeing localhost.)

Also, a curiosity, if I replace the index.php with index.html (a simple 
hello file), I get the Apache Test Page.  Shouldn't I get "Hello"?  If I 
type myDomain.com/index.html I get "Hello."

Ken

Re: [users@httpd] Lost connection to localhost

Posted by Joshua Slive <js...@gmail.com>.
On 10/6/05, kloomis <kl...@it-resources.com> wrote:
> I have tried various addresses for the httpd.conf file, using myDomain.com
> and 192.168.1.108 in the directives for server name and listen,
> NameVirtualHost and VirtualHost, appending the port :80.
>
> Does anyone have any idea why I cannot get to localhost from my browser, or
> why for that matter the machine cannot connect to mySQL thru localhost?

Use just
Listen 80
in httpd.conf and *no other Listen directives*.

If you specify 192.168.1.108 in your Listen directive, apache will
listen ONLY on that interface, at not on the loopback interface
(127.0.0.1 -- where localhost lives).

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org