Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache2 - trouble starting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ISHAIM
Apprentice
Apprentice


Joined: 08 Oct 2006
Posts: 161
Location: Chicago, IL

PostPosted: Wed Sep 30, 2009 3:48 am    Post subject: apache2 - trouble starting Reply with quote

I can't figure out why apache2 won't load correctly. Here is the output of 'sudo /etc/init.d/apache2 restart':
Code:
isaias@gentoo ~ $ sudo /etc/init.d/apache2 restart
 * Stopping apache2 ...
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd (no pid file) not running                                                                                                                                               [ ok ]
 * Starting apache2 ...
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName                                                                [ ok ]


There is no result yielded from 'ps aux | grep apache' or 'ps aux | grep http'.

Here is the result of 'sudo /etc/init.d/apache2 configtest':
Code:
isaias@gentoo ~ $ sudo /etc/init.d/apache2 configtest
 * Checking apache2 configuration ...                                                                                                                                         [ ok ]


And finally, 'sudo /etc/init.d/apache2 reload':
Code:
isaias@gentoo ~ $ sudo /etc/init.d/apache2 reload   
 * Gracefully restarting apache2 ...
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd not running, trying to start                                                                                                                                            [ !! ]


No results from http://127.0.0.1 or http://localhost either.

My /etc/hosts contains the line:
Code:
127.0.0.1       gentoo localhost
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Wed Sep 30, 2009 4:20 am    Post subject: Reply with quote

I don't think that's a good enough /etc/hosts

you will need some sort of FQDN, example
Code:
127.0.0.1 mybox.at.myplace mybox localhost


what is the output of
Code:
grep -i hostname /etc/conf.d/hostname

what is the output of
Code:
hostname -f
Back to top
View user's profile Send private message
ISHAIM
Apprentice
Apprentice


Joined: 08 Oct 2006
Posts: 161
Location: Chicago, IL

PostPosted: Thu Oct 01, 2009 3:31 am    Post subject: Reply with quote

In that case I'm not sure what a "good enough" /etc/hosts would consist of with a FQDN. I want to set the machine up locally, nothing special for remote access. Would that be gentoo.localdomain?

Output of grep -i hostname /etc/conf.d/hostname:
Code:
isaias@gentoo ~ $ grep -i hostname /etc/conf.d/hostname
# /etc/conf.d/hostname
# Set to the hostname of this machine
HOSTNAME="gentoo"


Output of hostname -f:
Code:
isaias@gentoo ~ $ hostname -f
gentoo.localdomain


(I edited /etc/hosts to be 127.0.0.1 gentoo.localdomain gentoo localhost)

Is "gentoo" a reserved word that cannot be used for host names?
Back to top
View user's profile Send private message
ISHAIM
Apprentice
Apprentice


Joined: 08 Oct 2006
Posts: 161
Location: Chicago, IL

PostPosted: Fri Nov 13, 2009 8:50 pm    Post subject: Reply with quote

Anybody have any ideas? I would like to get this working. I'm not sure what I'm doing wrong. I've set up Apache with MySQL/PHP before.

I am almost certain my problem lies with the configuration of my /etc/hosts and possibly my httpd.conf, except I'm a bit unsure what would be correct. Apache does not complain while starting up or with configtest, but a fullstatus test does return this error:

Code:
isaias@gentoo ~ $ sudo /etc/init.d/apache2 start
 * Starting apache2 ...                                                   [ ok ]
isaias@gentoo ~ $ sudo /etc/init.d/apache2 configtest
 * Checking apache2 configuration ...                                     [ ok ]
isaias@gentoo ~ $ sudo /etc/init.d/apache2 fullstatus

Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status


I am only going to be using Apache locally; I've read about FQDN's but I don't have one of those, so I'm uncertain if I should consider my domain "localdomain".
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Mon Nov 16, 2009 5:44 am    Post subject: Reply with quote

edit /etc/apache2/http.conf

somewhere in there add a line like:

Code:

ServerName gentoo.local


then see if you can start apache.

if that fails, edit httpd.conf (same path as before), and comment out this line:

Code:

LoadModule unique_id_module modules/mod_unique_id.so


by putting a # in front of it

Code:

#LoadModule unique_id_module modules/mod_unique_id.so


then see if you can start apache
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
ISHAIM
Apprentice
Apprentice


Joined: 08 Oct 2006
Posts: 161
Location: Chicago, IL

PostPosted: Tue Nov 17, 2009 8:19 pm    Post subject: Reply with quote

Neither of those solutions worked. I've noticed that when I Alt+Ctrl+F1 out of my Gnome session, the login screen will say "This is gentoo.unknown_domain". Changing what my domain is /etc/hosts has no effect, e.g.:

Code:
127.0.0.1 gentoo.localdomain gentoo localhost


will not change my domain to "localdomain", as the output of domainname is "(none)".

I'm not sure if Apache needs a domain to function correctly. I've tried combinations of ServerName gentoo, ServerName gentoo.localdomain, ServerName gentoo.local, all to no avail in /etc/apache/httpd.conf.

It seems as if Apache is mostly working except for this bit about host/domain being set up right.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum