[bndfc-web-tech] Re: Building apache and mod_perl

Alan Dawson aland at burngreave.net
Thu Jul 29 09:59:06 BST 2004


Quoting Bruno Postle <bruno at webarchitects.co.uk>:


> Try 'source'ing the mkdsetenv.sh file before restarting apache:
> 
>     source /path/to/mkdoc-site/mksetenv.sh
>     /usr/local/apache-whatever/bin/apachectl restart
> 
> ..and add this 'source' line to your startup/reboot script.


I've done this.. no change ..  here is my apache startup script


also ..  I started again and created a new database and completetly reinstalled
mkdoc.  

i had to do (i installed as mysql root previoulsy)


GRANT ALL on bndfcweb.* TO bndfcweb 

to get the permissions on the database  to be able to create the tables in the
database from the install-site.pl script.

and running apache -S gave me an error about 

[Thu Jul 29 03:52:05 2004] [warn] _default_ VirtualHost overlap on port 80, the
first has precedence


Until I changed to

<VirtualHost 10.10.2.66> rather than *


Also I don't see 

Heres my apache startup script

#!/bin/bash
#
# apache        Start the apache HTTP server.
#
# The variables below are NOT to be changed.  They are there to make the
# script more readable.  Look in /etc/defaults/apache for editable variables.

NAME=apache
DAEMON=/usr/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
CONF=/etc/$NAME/httpd.conf
APACHECTL=/usr/sbin/${NAME}ctl
ENV="env -i LANG=C PATH=/bin:/usr/bin:/sbin:/usr/sbin"
source /var/www/mkdoc/mkdoc-1.6.26/mksetenv.sh
trap "" 1

# Check that we're not being started by inetd
if egrep -q -i "^[[:space:]]*ServerType[[:space:]]+inet" $CONF
then
    exit 0
fi

test_config() {
    if [ ! -x $APACHECTL ]; then
        echo "$APACHECTL is not executable, exiting"
        exit 0
    fi

    # ensure we don't leak environment vars into apachectl
    APACHECTL="$ENV $APACHECTL"

    if ! $APACHECTL configtest 2> /dev/null
    then
        printf "Configuration syntax error detected. Not reloading.\n\n"
        $APACHECTL configtest
        exit 1
    fi
}

should_start() {
    if [ ! -x $DAEMON ]; then
        echo "apache is not executable, not starting"
        exit 0
    fi
}

case "$1" in
  start)
    should_start
    test_config
    echo -n "Starting web server: $NAME"
    $ENV start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON >
/dev/null
    ;;

  stop)
    echo -n "Stopping web server: $NAME"
    start-stop-daemon --stop --pidfile $PIDFILE --oknodo
    rm -rf /var/lib/apache/mod-bandwidth/link/*
    ;;

  reload | force-reload)
    test_config
    echo -n "Reloading $NAME configuration"
    start-stop-daemon --stop --pidfile $PIDFILE --signal USR1
    ;;

  reload-modules)
    test_config
    echo -n "Reloading $NAME modules"
    start-stop-daemon --stop --pidfile $PIDFILE --oknodo --retry 30
    should_start
    $ENV start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON >
/dev/null
    ;;

  restart)
    test_config
    echo -n "Restarting $NAME"
    if ! start-stop-daemon -q --stop --pidfile $PIDFILE --signal HUP; then
        $ENV start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON >
/dev/null
    fi
    ;;

  *)
    echo "Usage: /etc/init.d/$NAME
{start|stop|reload|reload-modules|force-reload|restart}"
    exit 1
    ;;
esac

if [ $? -eq 0 ]; then
        echo .
        exit 0
else
        echo " failed"
        exit 1
fi


-- 
"The long revolution is creating small federated microsocieties, true guerilla 

 cells practising and fighting for this self-management. Effective radicality  
 authorises all variations and guarantees every freedom. "  
  
 
 



More information about the bndfc-web-tech mailing list