You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Galaxy Virus <ga...@yahoo.com> on 2007/08/19 20:17:35 UTC

[users@httpd] want to start apache when server boot up HELP HELP

Hello,

  On FreeBSD release 6.1,  

      I configured apache 2.2.4 with all modules and installed.

     I would like to start apache when PC boots up.   How can I do it ?

rgds,
galaxy


      

  




       
---------------------------------
Shape Yahoo! in your own image.  Join our Network Research Panel today!

Re: [users@httpd] want to start apache when server boot up HELP HELP

Posted by Sander Temme <sc...@apache.org>.
Virus,

On Aug 19, 2007, at 12:34 PM, Galaxy Virus wrote:

> I couldnt.  Although I replaced the necessary path for every  
> PREFIX, httpd didnt wakeup when server boots up.  :(

The problem is actually very simple.  When FreeBSD boots, it calls  
every executable script in /usr/local/etc/rc.d with the argument  
"start".  When the system shuts down cleanly, the same scripts are  
invoked with the argument "stop".

You could put a short script in that directory that simply calls / 
path/to/your/apache/bin/httpd -k $1 , and you're done.  The -k  
argument tells Apache to interpret the following as start/stop/ 
restart/graceful command, and $1 sucks in the first parameter on the  
command line.

The work of writing that script has actually been done for you  
already: you could put a symlink to the apachectl script in that  
directory.  apachectl Responds to start and stop, so that gets you  
what you want.

S.

-- 
Sander Temme
sctemme@apache.org
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF




Re: [users@httpd] want to start apache when server boot up HELP HELP

Posted by Galaxy Virus <ga...@yahoo.com>.
I couldnt.  Although I replaced the necessary path for every PREFIX, httpd didnt wakeup when server boots up.  :( 



"Brian A. Seklecki" <la...@spiritual-machines.org> wrote: 
Right the RC script framework expects $LOCALBASE = /usr/local.  I haven't 
looked but you'll need to set:

  command="%%PREFIX%%/sbin/httpd"

Actually ports regex replacecs %%PREFIX%% to $LOCALBASE.  If you do the 
same, in theory you'll be okay. ~BAS

On Sun, 19 Aug 2007, Galaxy Virus wrote:

> Thank you so much. But could you please answer me more precisely 'coz I am very newbie in apache on FreeBSD.
>
> -  I gave file name as apache22.sh ( Although my apache folder name is /usr/local/apache2 ).
>
> - And I put apache22_enable="YES"  in /etc/rc.conf
>
> After rebooting, I didnt find httpd.
>
> regards,
> galaxy
>
>
>
>
>
>
> "Brian A. Seklecki"  wrote:
> On Sun, 19 Aug 2007, Galaxy Virus wrote:
>
>> Hello,
>>
>>  On FreeBSD release 6.1,
>
> If you installed it from FreeBSD ports, set "apache22_enable=YES" in
> /etc/rc.conf.
>
> If you didn't install it from Ports -- grab the FreeBSD RC script from:
>
> http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/apache22/files/apache22.sh.in?rev=1.3
>
> And drop it in place in /usr/local/etc/rc.d
>
> Cheers!
>
> ~BAS
>
>>
>>      I configured apache 2.2.4 with all modules and installed.
>>
>>     I would like to start apache when PC boots up.   How can I do it ?
>>
>> rgds,
>> galaxy
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------
>> Shape Yahoo! in your own image.  Join our Network Research Panel today!
>>
>>
>>
>>
>>
>>
>
>
>
> ---------------------------------
> Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links.

l8*
  -lava (Brian A. Seklecki - Pittsburgh, PA, USA)
         http://www.spiritual-machines.org/

     "Guilty? Yeah. But he knows it. I mean, you're guilty.
     You just don't know it. So who's really in jail?"
     ~Maynard James Keenan



       
---------------------------------
Pinpoint customers who are looking for what you sell. 

Re: [users@httpd] want to start apache when server boot up HELP HELP

Posted by "Brian A. Seklecki" <la...@spiritual-machines.org>.
Right the RC script framework expects $LOCALBASE = /usr/local.  I haven't 
looked but you'll need to set:

  command="%%PREFIX%%/sbin/httpd"

Actually ports regex replacecs %%PREFIX%% to $LOCALBASE.  If you do the 
same, in theory you'll be okay. ~BAS

On Sun, 19 Aug 2007, Galaxy Virus wrote:

> Thank you so much. But could you please answer me more precisely 'coz I am very newbie in apache on FreeBSD.
>
> -  I gave file name as apache22.sh ( Although my apache folder name is /usr/local/apache2 ).
>
> - And I put apache22_enable="YES"  in /etc/rc.conf
>
> After rebooting, I didnt find httpd.
>
> regards,
> galaxy
>
>
>
>
>
>
> "Brian A. Seklecki" <la...@spiritual-machines.org> wrote:
> On Sun, 19 Aug 2007, Galaxy Virus wrote:
>
>> Hello,
>>
>>  On FreeBSD release 6.1,
>
> If you installed it from FreeBSD ports, set "apache22_enable=YES" in
> /etc/rc.conf.
>
> If you didn't install it from Ports -- grab the FreeBSD RC script from:
>
> http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/apache22/files/apache22.sh.in?rev=1.3
>
> And drop it in place in /usr/local/etc/rc.d
>
> Cheers!
>
> ~BAS
>
>>
>>      I configured apache 2.2.4 with all modules and installed.
>>
>>     I would like to start apache when PC boots up.   How can I do it ?
>>
>> rgds,
>> galaxy
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------
>> Shape Yahoo! in your own image.  Join our Network Research Panel today!
>>
>>
>>
>>
>>
>>
>
>
>
> ---------------------------------
> Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links.

l8*
 	-lava (Brian A. Seklecki - Pittsburgh, PA, USA)
 	       http://www.spiritual-machines.org/

     "Guilty? Yeah. But he knows it. I mean, you're guilty.
     You just don't know it. So who's really in jail?"
     ~Maynard James Keenan


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] want to start apache when server boot up HELP HELP

Posted by Galaxy Virus <ga...@yahoo.com>.
Thank you so much. But could you please answer me more precisely 'coz I am very newbie in apache on FreeBSD.

-  I gave file name as apache22.sh ( Although my apache folder name is /usr/local/apache2 ).

- And I put apache22_enable="YES"  in /etc/rc.conf

After rebooting, I didnt find httpd.   

regards,
galaxy






"Brian A. Seklecki" <la...@spiritual-machines.org> wrote: 
On Sun, 19 Aug 2007, Galaxy Virus wrote:

> Hello,
>
>  On FreeBSD release 6.1,

If you installed it from FreeBSD ports, set "apache22_enable=YES" in 
/etc/rc.conf.

If you didn't install it from Ports -- grab the FreeBSD RC script from:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/apache22/files/apache22.sh.in?rev=1.3

And drop it in place in /usr/local/etc/rc.d

Cheers!

~BAS

>
>      I configured apache 2.2.4 with all modules and installed.
>
>     I would like to start apache when PC boots up.   How can I do it ?
>
> rgds,
> galaxy
>
>
>
>
>
>
>
>
>
>
> ---------------------------------
> Shape Yahoo! in your own image.  Join our Network Research Panel today!
>
>
>
>
>
>


       
---------------------------------
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links. 

Re: [users@httpd] want to start apache when server boot up HELP HELP

Posted by "Brian A. Seklecki" <la...@spiritual-machines.org>.
On Sun, 19 Aug 2007, Galaxy Virus wrote:

> Hello,
>
>  On FreeBSD release 6.1,

If you installed it from FreeBSD ports, set "apache22_enable=YES" in 
/etc/rc.conf.

If you didn't install it from Ports -- grab the FreeBSD RC script from:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/apache22/files/apache22.sh.in?rev=1.3

And drop it in place in /usr/local/etc/rc.d

Cheers!

~BAS

>
>      I configured apache 2.2.4 with all modules and installed.
>
>     I would like to start apache when PC boots up.   How can I do it ?
>
> rgds,
> galaxy
>
>
>
>
>
>
>
>
>
>
> ---------------------------------
> Shape Yahoo! in your own image.  Join our Network Research Panel today!
>
>
>
>
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org