LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-15-2008, 01:39 PM   #1
htamayo
Member
 
Registered: Jan 2005
Location: san salvador, el salvador
Distribution: Debian Stable, UbuntuStudio Karmic Koala
Posts: 190

Rep: Reputation: 30
apache2 doesn't work


Hi, After an OS upgrade (Debian Etch to Debian Sid), i can't start apache2, at this time, I've already done these:

1. I've checked if apache2 is running:
Quote:
tamayo@350z:~$ ps ax | grep apache2
3856 ? Ss 0:01 /usr/sbin/apache2 -k start
3983 ? S 0:00 /usr/sbin/apache2 -k start
3984 ? S 0:00 /usr/sbin/apache2 -k start
3985 ? S 0:00 /usr/sbin/apache2 -k start
3986 ? S 0:00 /usr/sbin/apache2 -k start
3987 ? S 0:00 /usr/sbin/apache2 -k start
11632 pts/0 S+ 0:00 grep apache2
2. I've checked the apache2.conf file and it seems ok:

Quote:
ServerRoot "/etc/apache2"
LockFile /var/lock/apache2/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" $
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combin$
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
Include /etc/apache2/conf.d/
Include /etc/apache2/sites-enabled/
ServerName 350z
<Directory />
Options None
AllowOverride None
</Directory>

<Directory /var/www/nomina>
AllowOverride None
order allow,deny
allow from all
Options Indexes Includes FollowSymLinks
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

DirectoryIndex login.php index.php

3. I've tried to reload the service, (/etc/init.d/apache2 reload) and I got this:

Quote:

Reloading web server config: apache2[Thu Dec 11 15:21:47 2008] [warn] NameVirtualHost *:80 has no VirtualHosts
But I understand that is a warning, not an error, but still apache doesn't work. I go to the browser and type http://localhost and nothing, it tries to lookup in the internet not in the host.

4. here is my error.log, it seems ok for me:

Quote:

[Fri Dec 12 12:02:11 2008] [notice] Apache/2.2.9 (Debian) PHP/5.2.6-5 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g mod_perl/2.0.4 $
[Fri Dec 12 15:49:30 2008] [notice] caught SIGTERM, shutting down
[Mon Dec 15 07:55:01 2008] [notice] Apache/2.2.9 (Debian) PHP/5.2.6-5 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g mod_perl/2.0.4 $
So, my questions are:
1. I don't know where should I start, because, at least, the conf files and the log file don't tell me any relevant, are there commands of something else to check what is wrong with apache?

2. do you know, what are the essential packages for install correctly apache?

3. also cups-admin doesn't work (http://localhost:631), is this service (cups-admin) embedded to apache?

Regards
 
Old 12-15-2008, 01:59 PM   #2
htamayo
Member
 
Registered: Jan 2005
Location: san salvador, el salvador
Distribution: Debian Stable, UbuntuStudio Karmic Koala
Posts: 190

Original Poster
Rep: Reputation: 30
I want to post the output of apache2ctl, maybe with this anyone can give some ideas for debug this

Quote:
350z:/home/tamayo# sudo apache2ctl fullstatus

Looking up localhost
Unable to locate remote host localhost.
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status
 
Old 12-15-2008, 03:50 PM   #3
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by htamayo View Post
I want to post the output of apache2ctl, maybe with this anyone can give some ideas for debug this
Can you show us the output of your hosts file?

Code:
cat /etc/hosts
 
Old 12-15-2008, 03:50 PM   #4
htamayo
Member
 
Registered: Jan 2005
Location: san salvador, el salvador
Distribution: Debian Stable, UbuntuStudio Karmic Koala
Posts: 190

Original Poster
Rep: Reputation: 30
Hi, the problem is solved, let me tell you:

1. I checked my ports.conf and I figured out that the line NameVirtualHost *:80 was generating the warning of the virtualhost, so I deleted.

2. I checked my /etc/hosts and doing some tweak weeks ago I changed the 127.0.0.1 localhost to another name and that's it, now, I restart the networking and apache2 and I could get output of the command apache2ctl fullstatus. but a this time still http://localhost doesn't work. Now, in the fullstatus's output I saw that the request time wasn't inmediately.

3. So, I found in another forum that when localhost doesn't run is because each virtualhost needs to have a docroot, but if you don't have any virtualhost the apache2.conf doesn't have any, so I added to my apache2.conf this:
DocumentRoot "/var/www"
restart the service and that's it, it works

Regards

Tamayo
 
  


Reply



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
Need help with getting PHP5 to work on Apache2 rehat Linux - Server 2 08-06-2008 12:17 PM
apache2 won't work with anything.. e.v.o Slackware 13 04-15-2007 12:41 AM
Help can't get Apache2 with mod_perl to work rforrister Ubuntu 1 04-12-2007 03:18 AM
Apache2 #httpd -l won't work peterchin Linux - Software 1 02-24-2005 01:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:49 PM.

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