How do I start Apache automatically?

How do I start Apache automatically?

Post by Chuck Hutchin » Sun, 25 Mar 2001 17:30:55



I want to have Apache start automatically if the system is re-booted.  I
know this seems simple but I can't get it to work.

I'm running under HP-UX 10.20
I've tried using the inittab file but I haven't had any luck making it work.
I must be doing something wrong with the inittab entry.

Anybody have the correct method and config for HP-UX 10.20 ??

Thanks

    Chuck Hutchins

 
 
 

How do I start Apache automatically?

Post by Tom Hoffma » Mon, 26 Mar 2001 09:12:50



>I want to have Apache start automatically if the system is re-booted.  I
>know this seems simple but I can't get it to work.

>I'm running under HP-UX 10.20
>I've tried using the inittab file but I haven't had any luck making it work.
>I must be doing something wrong with the inittab entry.

The standard method in HPUX for starting user applications like Apache
is to construct a startup execution script in /sbin/init.d named apache.
There is a template file in /sbin/init.d that you can use as a guide.
You would also set up a configuration script in /etc/rc.config.d named
apache that would set any environment variables ... as a minimum
something to tell the execution script that you want to start apache,
i.e., (APACHESTART=1). You would also build symlinks in the respective
/sbin/rcN.d directories to kill (K900apache) and start (S900apache). Check
out /sbin/rc2.d and /sbin/rc4.d.

While this may seem like more work (and it is) than /etc/inittab it is
the standard way to do it under HPUX. You should get familiar with it
if you are going to spend any time around HPUX.

If you insist on using inittab a line like this should work:

apache:4:wait:/usr/bin/apachectl start > /dev/null 2>&1

Note that your apachectl binary may be somewhere else. Hope this helps.

 
 
 

1. how to start the Apache with SSL automatically?

Dear all,

I just install the Apache+mySQL+PHP3+OpenSSL+mod-SSL on my Solaris 7 x86.
i add the following line to my start script so that the apache can start
automatically when the server reboot

/usr/local/apache/bin/apachectl startssl

the problem is that it only give me 2 seconds to enter the ssl password. if
i miss it the apache wont start after reboot. can anyone tell me how to make
it auto enter the password. or is there any way to make the Apache
automatically start with SSL when the server reboot

--
regards,

Chris Chan

2. Mounting an HFS partition

3. how to start apache-1.3.22 w/ ssl automatically on RH7.2 box

4. HELP keyboard lookup sco5 on pentium >75Mh

5. apache on RH not starting automatically

6. atoi\itoa

7. Where would YOU start Apache automatically?

8. Can telnet externally, not locally. (WIN98->RH60) Why?

9. Can Apache be started automatically upon system boot?

10. How to automatically start Apache on Bootup

11. how to start kde automatically when x starts?

12. X can start by startx, but when started automatically after linux is loaded,it hangs

13. How do I start X automatically when I start Linux???