PDA

View Full Version : apache help



alienjeff
12-27-2005, 11:51 PM
I want to add a tiny script "apachectl start" so my apache server is up and running on reboot, instead of having to enter the comand manually. Would someone please direct me where to add such a script? One of the rc#.d files? Elsewhere?

Thanks in advance.

Dave_Bechtel
12-28-2005, 03:05 AM
--I blv you can put it in " /etc/init.d/bootmisc.sh "


I want to add a tiny script "apachectl start" so my apache server is up and running on reboot, instead of having to enter the comand manually. Would someone please direct me where to add such a script? One of the rc#.d files? Elsewhere?

Thanks in advance.

alienjeff
12-28-2005, 04:24 AM
Nope. No dice. Tried it straight "apachectl start" and "/usr/sbin/apache start" and no go.

What I want to accomplish is having that command run should I be away from the computer and there being an unexpected reboot. I want the server to come back up without human intervention.

Thanks for the try, though. Back to the Debian online dox. Sigh.

EDIT MODE UPDATE!

Got it working. Here's what I did (from terminal with 'su' privies):

cd /etc/init.d
cp apache /etc/rc5.d
cd /etc/rc5.d
cp apache S90apache
rm apache

Did a reboot, lo and behold: apache loaded between sshd and kdm sequence. Victory! Finally.

Funny how such small victories can fire up a n00b like me. heh.

Dave_Bechtel
12-28-2005, 04:57 AM
Easier to do a symlink:

' cd /etc/rc5.d '
' ln /etc/init.d/apache S90apache -sfn '

--That way you don't have to worry about duplicate scripts, and the apache file will always have the latest mods from the package maintainer.


Nope. No dice. Tried it straight "apachectl start" and "/usr/sbin/apache start" and no go.

What I want to accomplish is having that command run should I be away from the computer and there being an unexpected reboot. I want the server to come back up without human intervention.

Thanks for the try, though. Back to the Debian online dox. Sigh.

EDIT MODE UPDATE!

Got it working. Here's what I did (from terminal with 'su' privies):

cd /etc/init.d
cp apache /etc/rc5.d
cd /etc/rc5.d
cp apache S90apache
rm apache

Did a reboot, lo and behold: apache loaded between sshd and kdm sequence. Victory! Finally.

Funny how such small victories can fire up a n00b like me. heh.

alienjeff
12-28-2005, 05:31 AM
Thanks, Dave! I did the commands and rebooted. All works well. Appreciate the help! -Jeff