LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-12-2005, 01:26 AM   #1
blueheart
LQ Newbie
 
Registered: Dec 2004
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
Unhappy Apache2 debian sarge: browser can't connect to the localhost


Hello!

I'm using Debian Sarge and would like setting up my LAMP system.
L, M and P are fine... but A doesn't work

I installed Apache2 (with apt-get) and everything seems to be all right. And it looks well configured.

The problem is: the browser cannot connect to the 127.0.0.1 page.

I also configured a two pc lan and the pc I use where not the server it had the 192.168.0.2 ip. I changed the configuration and made it as the server, but the trick still has me.

I don't know what kind of problem is this...

Thanks a lot for help.
Blueheart
 
Old 07-12-2005, 05:53 AM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Check to make sure that Apache2 is running. After I upgraded from Apache 1.3 to Apache2, I found the system had disabled Apache 1.3 starting, but then not enable Apache 2 to load at boot. I think
Code:
/etc/init.d/apache2 start
should get it running. If not, check the apache log files to see if is reporting an error in loading.
 
Old 07-12-2005, 10:48 AM   #3
blueheart
LQ Newbie
 
Registered: Dec 2004
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Hello,

Apache2 is running while I try to access the localhost page with the browser.

I restarted A2 and checked the error.log file (/var/log/apache2/error.log right?) but doesn't report anything.

I don't know what to do. I also reinstalled the whole server but nothing changed...

Thanks for now.

PS: please help me.
 
Old 07-12-2005, 11:17 AM   #4
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Hmmm, cool. Did the access.log file reporting anything then if error.log was empty? And yes, you were in the right place :-) Try:
Code:
ps aux | grep apache
to double-check Apache is running. It should a few lines saying something like:
Code:
www-data  4531  0.0  0.5  7184 2652 ?        S    17:06   0:00 /usr/sbin/apache2 -k start -DSSL
If not, then Apache2 just isn't playing nice. And this does the same after you've reinstalled the whole server (a bit of a brutal step!). Are the network interface configured ok, not that it should matter is you access http://localhost ? What does your browser actually report when you access localhost?
 
Old 07-12-2005, 08:38 PM   #5
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
Re: Apache2 debian sarge: browser can't connect to the localhost

1.
Quote:
The problem is: the browser cannot connect to the 127.0.0.1 page.
I assume you mean that you are running apache2 on machineA, and that
using a browser on machineA you can't load a page from either:
http://127.0.0.1
or
http://localhost

Have a look in /etc/apache2/sites-enabled
You should see something like 000-default
(which is a link to a config file in the sites-available directory).
Viewing this file, you should confirm that the following stanzas exist:


DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/
</Directory>

ErrorLog /var/log/apache2/error.log


Pay particular attention to lines containing: "Allow from"

If you are going to attempt a clean install, make sure you purge your old config files first:
#apt-get remove --purge apache2
otherwise you'll end up with the same problem.

Quote:
I also configured a two pc lan and the pc I use where not the server it had the 192.168.0.2 ip. I changed the configuration and made it as the server, but the trick still has me.
I can't decipher that statement.

 
Old 07-15-2005, 11:12 AM   #6
blueheart
LQ Newbie
 
Registered: Dec 2004
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Hello,

typing "ps aux | grep apache" the output looked right.

the browser says: An error occurred while loading http://localhost.localdomain: could not connect to host localhost.localdomain



in etc/apache2/sites-enabled/000-default looks like what has been posted.





Bye for now

PS I am sorry for the English, I am not English native.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 not processing PHP4 pages on Debian Sarge blue penguin Linux - Software 8 08-24-2006 02:56 PM
Problems setting up virtual hosts with debian sarge and apache2 dthacker Debian 1 11-23-2005 05:25 PM
[Apache2] Localhost can connect to HTTPS, but not clients in the LAN Akhran Linux - Newbie 3 09-12-2005 05:13 PM
Cannot connect to wireless net on Debian (sarge) PeaceTank Linux - Wireless Networking 0 12-25-2004 07:23 PM
[apache2] could not connect to host localhost LordFrancis Linux - Networking 1 09-30-2004 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration