View previous topic :: View next topic |
Author |
Message |
mogosjoh Tux's lil' helper

Joined: 24 Apr 2002 Posts: 79 Location: Plymouth, MI
|
Posted: Wed Oct 09, 2002 2:37 am Post subject: apache startup question |
|
|
alright, so I am working on getting apache up and running on my system and I have 2 questions. I have already emerged and configured, and did rc-update add apache default, but upon boot I see:
starting apache... [!!]
with no error message
then, once booted, it appears that apache is not started (can't access web pages), so I then (as root) type 'apache' and it works ok. However, I will not leave it running this way because that is fundamentally dumb (running apache as root). Also, I have 2 NICs in my system, both getting IP's from DHCP, and I saw an earlier error with resolving the hostname (used to be defined in /etc/hostname, but now is not). How can I make apache happy with 2 NICs or set it up to only use 1 of them instead??
thanks,
-John |
|
Back to top |
|
 |
mihochan Apprentice


Joined: 16 Apr 2002 Posts: 296 Location: Melbourne again
|
Posted: Wed Oct 09, 2002 5:08 am Post subject: |
|
|
I can't help with the second query but possibly the reason for the first is
that apache can't create or write to its log files when not run as root.
In my experience, this is often the problem behind the sort of symptoms you are describing.
Tom _________________ In the long run we are all dead - Keynes |
|
Back to top |
|
 |
mogosjoh Tux's lil' helper

Joined: 24 Apr 2002 Posts: 79 Location: Plymouth, MI
|
Posted: Wed Oct 09, 2002 12:52 pm Post subject: |
|
|
ok, what's the solution? |
|
Back to top |
|
 |
rizzo Retired Dev


Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Wed Oct 09, 2002 1:00 pm Post subject: |
|
|
Note that apache doesn't RUN as root. It runs as "apache". It needs to be started as root though.
So:
Code: | su -
Password: (enter root password)
/etc/init.d/apache stop
/etc/init.d/apache start
|
Make sure your user is in the "wheel" group, otherwise you don't be able to "su". |
|
Back to top |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Wed Oct 09, 2002 6:23 pm Post subject: |
|
|
Can you try running the start-stop-daemon command that /etc/init.d/apache is running by hand, substituting out the '--quiet' option with "--verbose"? That should tell you in some more detail what's happening. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
 |
mogosjoh Tux's lil' helper

Joined: 24 Apr 2002 Posts: 79 Location: Plymouth, MI
|
Posted: Wed Oct 09, 2002 7:51 pm Post subject: |
|
|
fixed it, had to chown /home/httpd to apache.. duh |
|
Back to top |
|
 |
mihochan Apprentice


Joined: 16 Apr 2002 Posts: 296 Location: Melbourne again
|
Posted: Wed Oct 09, 2002 10:48 pm Post subject: |
|
|
That is pretty much the sort of problem I had expected.
Apache didn't have access to the directories it needed to run.
Looks like you worked it out for yourself. _________________ In the long run we are all dead - Keynes |
|
Back to top |
|
 |
|