кратко что я вытворял под руководством опытного товарища
#cd /usr/local/etc/rc.d
# ll
total 16
-r-xr-xr-x 1 root wheel 4744 Aug 27 07:45 apache22
-r-xr-xr-x 1 root wheel 833 Oct 28 2006 avahi-daemon.sh
-r-xr-xr-x 1 root wheel 1072 Oct 28 2006 avahi-dnsconfd.sh
-r-xr-xr-x 1 root wheel 622 Oct 28 2006 dbus
-r-xr-xr-x 1 root wheel 1184 Oct 15 2006 exim.sh
-r-xr-xr-x 1 root wheel 1046 Oct 15 2006 postfix
......
# cat apache22
#!/bin/sh
#
# $FreeBSD: ports/www/apache22/files/apache22.sh.in,v 1.1 2006/09/24 16:16:40 clement Exp $
#
# PROVIDE: apache22
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable apache22:
# apache22_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable apache22
# apache22_profiles (str): Set to "" by default.
# Define your profiles here.
# apache22limits_enable (bool):Set to "NO" by default.
# Set it to yes to run `limits $limits_args`
# just before apache starts.
# apache22_flags (str): Set to "" by default.
# Extra flags passed to start command.
# apache22limits_args (str): Default to "-e -C daemon"
# Arguments of pre-start limits run.
# apache22_http_accept_enable (bool): Set to "NO" by default.
# Set to yes to check for accf_http kernel
# module on start up and load if not loaded.
. /etc/rc.subr
name="apache22"
rcvar=`set_rcvar`
start_precmd="apache22_precmd"
restart_precmd="apache22_checkconfig"
reload_precmd="apache22_checkconfig"
reload_cmd="apache22_graceful"
graceful_cmd="apache22_graceful"
gracefulstop_cmd="apache22_gracefulstop"
configtest_cmd="apache22_checkconfig"
command="/usr/local/sbin/httpd"
_pidprefix="/var/run/httpd"
pidfile="${_pidprefix}.pid"
required_files=/usr/local/etc/apache22/httpd.conf
..........
* тут встевил apache22_enable куда просил товарищь чуть выше
# //usr/local/etc/rc.d/apache22 start
Performing sanity check on apache22 configuration:
httpd: apr_sockaddr_info_get() failed for tools.voliacable.com
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
Starting apache22.
httpd: apr_sockaddr_info_get() failed for tools.voliacable.com
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
# ps -auxww|grep http
root 60642 0.0 0.0 372 252 p0 R+ 8:58AM 0:00.00 grep http
# netstat -an|grep LISTEN
tcp4 0 0 127.0.0.1.25 *.* LISTEN
tcp4 0 0 *.22 *.* LISTEN
tcp6 0 0 *.22 *.* LISTEN
# /usr/local/etc/rc.d/apache22 status
apache22 is not running.
# cat httpd-error.log
[Tue Aug 28 08:50:48 2007] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Aug 28 08:50:48 2007] [alert] (EAI
Configuration Failed
[Tue Aug 28 08:55:23 2007] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Aug 28 08:55:23 2007] [alert] (EAI hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "rex.bex.fex"
Configuration Failed
[Tue Aug 28 08:56:47 2007] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Aug 28 08:56:47 2007] [alert] (EAI hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "rex.bex.fex"
Configuration Failed
# cat /etc/hosts
::1 localhost localhost.my.domain
127.0.0.1 localhost localhost.my.domain
* localhost.my.domain заменил на rex.bex.fex
#top|grep httpd
PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
60702 root 1 8 0 6416K 4864K nanslp 0:01 16.02% httpd
Получился танец с бубном- такое случается тогда, когда неправильно что-то настроено изначально
