Solved

FreeBSD 6.1, Apache 2.1.4, and rc.d

Posted on 2006-10-29
4
581 Views
Last Modified: 2013-11-22
Apache runs great but I have to manually start it after a reboot.  I have included "apache_enable="YES" in /etc/rc.conf.  And checked it twice for typos and consider it good.  I looked into /etc/rc.d and do not see anything "Apache" there.  I think this is the problem but wonder where can I get a copy of the 6.1 start up script to test my theory?
0
Comment
Question by:Shearer-Services
  • 2
  • 2
4 Comments
 
LVL 29

Accepted Solution

by:
TeRReF earned 500 total points
ID: 17828560
Change it into:
apache21_enable="YES"
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 17828567
The apache startup script resides in:
/usr/local/etc/rc.d/

There you'll find a .sh script named:
apache21.sh (hence the apache21_enable line in rc.conf)

If the apache script is called differently, use a corresponding line in rc.conf
0
 
LVL 1

Expert Comment

by:vbotka
ID: 17828594
Settings of the user-installed aplications is placed in the /usr/local base. So the the directories to take a look at are /usr/local/etc and /usr/local/etc/rc.d. For apache the configuration files are placed in /usr/local/etc/apache/ and the start-up script is /usr/local/etc/rc.d/apache.sh . The script is placed there by the "make install" but here is the listing anyway:

### start listing here

# cat /usr/local/etc/rc.d/apache.sh
#!/bin/sh
# $FreeBSD: ports/www/apache13-modssl/files/rcng.sh,v 1.5 2006/02/20 20:47:46 dougb Exp $

# PROVIDE: apache
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown

# Define these apache_* variables in one of these files:
#       /etc/rc.conf
#       /etc/rc.conf.local
#       /etc/rc.conf.d/apache
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
apache_enable="${apache_enable-NO}"
apache_flags="-DSSL"
apache_pidfile="/var/run/httpd.pid"

. /etc/rc.subr

name="apache"
rcvar=`set_rcvar`
command="/usr/local/sbin/httpd"

load_rc_config $name

pidfile="${apache_pidfile}"
start_precmd="`/usr/bin/limits -e -U www`"

run_rc_command "$1"

### stop listing here

Try to start apache with:
#/usr/local/etc/rc.d/apache.sh star

And check if it is running:
# /usr/local/etc/rc.d/apache.sh status
apache is running as pid 646.

You do not have to reboot the box.
0
 
LVL 1

Expert Comment

by:vbotka
ID: 17828598
Errata:
Try to start apache with:
#/usr/local/etc/rc.d/apache.sh start
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now