LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache2 debian sarge: browser can't connect to the localhost (https://www.linuxquestions.org/questions/linux-software-2/apache2-debian-sarge-browser-can%27t-connect-to-the-localhost-342352/)

blueheart 07-12-2005 01:26 AM

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

fouldsy 07-12-2005 05:53 AM

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.

blueheart 07-12-2005 10:48 AM

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.

fouldsy 07-12-2005 11:17 AM

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?

uberNUT69 07-12-2005 08:38 PM

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.

:)

blueheart 07-15-2005 11:12 AM

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.


All times are GMT -5. The time now is 06:28 PM.