Переменные Apache2 Evironment Отсутствуют при загрузке

Как исправить apache2, чтобы он начинался с переменных среды?

Моя система – Linux Mint 17. Я установил Apache2 с помощью этой команды: sudo apt-get install php5 libapache2-mod-php5

Тестирование с помощью веб-браузера работало правильно.

Проблема в том, что эта команда говорит, что есть проблема

/usr/sbin/apache2 -V ... AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf: Invalid Mutex directory in argument file:${APACHE_LOCK_DIR} 

Если я запустил эти команды,

 (from su -) source /etc/apache2/envvars service apache2 stop service apache2 start /usr/sbin/apache2 -V 

вывод выглядит ОК (кроме FQDN не определено). Проблема исправлена.

Когда я перезагружаю систему, apache запускается, но не имеет envvars.

Как исправить это, чтобы apache начинал с его envvars?

Вот мой /etc/init.d/apache2:

 #!/bin/sh ### BEGIN INIT INFO # Provides: apache2 # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop apache2 web server # Description: Start the web server and associated helpers # This script will start apache2, and possibly all associated instances. # Moreover, it will set-up temporary directories and helper tools such as # htcacheclean when required by the configuration. ### END INIT INFO DESC="web server" NAME=apache2 DAEMON=/usr/sbin/$NAME SCRIPTNAME="${0##*/}" SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" if [ -n "$APACHE_CONFDIR" ] ; then if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" else DIR_SUFFIX= fi elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then DIR_SUFFIX="-${SCRIPTNAME##apache2-}" APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX else DIR_SUFFIX= APACHE_CONFDIR=/etc/apache2 fi if [ -z "$APACHE_ENVVARS" ] ; then APACHE_ENVVARS=$APACHE_CONFDIR/envvars fi export APACHE_CONFDIR APACHE_ENVVARS ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR" fi if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then ENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS" fi #edit /etc/default/apache2 to change this. HTCACHECLEAN_RUN=auto HTCACHECLEAN_MODE=daemon HTCACHECLEAN_SIZE=300M HTCACHECLEAN_DAEMON_INTERVAL=120 HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_cache_disk HTCACHECLEAN_OPTIONS="" # Read configuration variable file if it is present if [ -f /etc/default/apache2$DIR_SUFFIX ] ; then . /etc/default/apache2$DIR_SUFFIX elif [ -f /etc/default/apache2 ] ; then . /etc/default/apache2 fi PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) VERBOSE=no if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi . /lib/lsb/init-functions # Now, set defaults: APACHE2CTL="$ENV apache2ctl" HTCACHECLEAN="$ENV htcacheclean" PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) APACHE2_INIT_MESSAGE="" CONFTEST_OUTFILE= cleanup() { if [ -n "$CONFTEST_OUTFILE" ] ; then rm -f "$CONFTEST_OUTFILE" fi } trap cleanup 0 # "0" means "EXIT", but "EXIT" is not portable apache_conftest() { [ -z "$CONFTEST_OUTFILE" ] || rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE=$(mktemp) if ! $APACHE2CTL configtest > "$CONFTEST_OUTFILE" 2>&1 ; then return 1 else rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE= return 0 fi } и #!/bin/sh ### BEGIN INIT INFO # Provides: apache2 # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop apache2 web server # Description: Start the web server and associated helpers # This script will start apache2, and possibly all associated instances. # Moreover, it will set-up temporary directories and helper tools such as # htcacheclean when required by the configuration. ### END INIT INFO DESC="web server" NAME=apache2 DAEMON=/usr/sbin/$NAME SCRIPTNAME="${0##*/}" SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" if [ -n "$APACHE_CONFDIR" ] ; then if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" else DIR_SUFFIX= fi elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then DIR_SUFFIX="-${SCRIPTNAME##apache2-}" APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX else DIR_SUFFIX= APACHE_CONFDIR=/etc/apache2 fi if [ -z "$APACHE_ENVVARS" ] ; then APACHE_ENVVARS=$APACHE_CONFDIR/envvars fi export APACHE_CONFDIR APACHE_ENVVARS ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR" fi if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then ENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS" fi #edit /etc/default/apache2 to change this. HTCACHECLEAN_RUN=auto HTCACHECLEAN_MODE=daemon HTCACHECLEAN_SIZE=300M HTCACHECLEAN_DAEMON_INTERVAL=120 HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_cache_disk HTCACHECLEAN_OPTIONS="" # Read configuration variable file if it is present if [ -f /etc/default/apache2$DIR_SUFFIX ] ; then . /etc/default/apache2$DIR_SUFFIX elif [ -f /etc/default/apache2 ] ; then . /etc/default/apache2 fi PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) VERBOSE=no if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi . /lib/lsb/init-functions # Now, set defaults: APACHE2CTL="$ENV apache2ctl" HTCACHECLEAN="$ENV htcacheclean" PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) APACHE2_INIT_MESSAGE="" CONFTEST_OUTFILE= cleanup() { if [ -n "$CONFTEST_OUTFILE" ] ; then rm -f "$CONFTEST_OUTFILE" fi } trap cleanup 0 # "0" means "EXIT", but "EXIT" is not portable apache_conftest() { [ -z "$CONFTEST_OUTFILE" ] || rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE=$(mktemp) if ! $APACHE2CTL configtest > "$CONFTEST_OUTFILE" 2>&1 ; then return 1 else rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE= return 0 fi } и #!/bin/sh ### BEGIN INIT INFO # Provides: apache2 # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop apache2 web server # Description: Start the web server and associated helpers # This script will start apache2, and possibly all associated instances. # Moreover, it will set-up temporary directories and helper tools such as # htcacheclean when required by the configuration. ### END INIT INFO DESC="web server" NAME=apache2 DAEMON=/usr/sbin/$NAME SCRIPTNAME="${0##*/}" SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" if [ -n "$APACHE_CONFDIR" ] ; then if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" else DIR_SUFFIX= fi elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then DIR_SUFFIX="-${SCRIPTNAME##apache2-}" APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX else DIR_SUFFIX= APACHE_CONFDIR=/etc/apache2 fi if [ -z "$APACHE_ENVVARS" ] ; then APACHE_ENVVARS=$APACHE_CONFDIR/envvars fi export APACHE_CONFDIR APACHE_ENVVARS ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR" fi if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then ENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS" fi #edit /etc/default/apache2 to change this. HTCACHECLEAN_RUN=auto HTCACHECLEAN_MODE=daemon HTCACHECLEAN_SIZE=300M HTCACHECLEAN_DAEMON_INTERVAL=120 HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_cache_disk HTCACHECLEAN_OPTIONS="" # Read configuration variable file if it is present if [ -f /etc/default/apache2$DIR_SUFFIX ] ; then . /etc/default/apache2$DIR_SUFFIX elif [ -f /etc/default/apache2 ] ; then . /etc/default/apache2 fi PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) VERBOSE=no if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi . /lib/lsb/init-functions # Now, set defaults: APACHE2CTL="$ENV apache2ctl" HTCACHECLEAN="$ENV htcacheclean" PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) APACHE2_INIT_MESSAGE="" CONFTEST_OUTFILE= cleanup() { if [ -n "$CONFTEST_OUTFILE" ] ; then rm -f "$CONFTEST_OUTFILE" fi } trap cleanup 0 # "0" means "EXIT", but "EXIT" is not portable apache_conftest() { [ -z "$CONFTEST_OUTFILE" ] || rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE=$(mktemp) if ! $APACHE2CTL configtest > "$CONFTEST_OUTFILE" 2>&1 ; then return 1 else rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE= return 0 fi } и #!/bin/sh ### BEGIN INIT INFO # Provides: apache2 # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop apache2 web server # Description: Start the web server and associated helpers # This script will start apache2, and possibly all associated instances. # Moreover, it will set-up temporary directories and helper tools such as # htcacheclean when required by the configuration. ### END INIT INFO DESC="web server" NAME=apache2 DAEMON=/usr/sbin/$NAME SCRIPTNAME="${0##*/}" SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" if [ -n "$APACHE_CONFDIR" ] ; then if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" else DIR_SUFFIX= fi elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then DIR_SUFFIX="-${SCRIPTNAME##apache2-}" APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX else DIR_SUFFIX= APACHE_CONFDIR=/etc/apache2 fi if [ -z "$APACHE_ENVVARS" ] ; then APACHE_ENVVARS=$APACHE_CONFDIR/envvars fi export APACHE_CONFDIR APACHE_ENVVARS ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR" fi if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then ENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS" fi #edit /etc/default/apache2 to change this. HTCACHECLEAN_RUN=auto HTCACHECLEAN_MODE=daemon HTCACHECLEAN_SIZE=300M HTCACHECLEAN_DAEMON_INTERVAL=120 HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_cache_disk HTCACHECLEAN_OPTIONS="" # Read configuration variable file if it is present if [ -f /etc/default/apache2$DIR_SUFFIX ] ; then . /etc/default/apache2$DIR_SUFFIX elif [ -f /etc/default/apache2 ] ; then . /etc/default/apache2 fi PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) VERBOSE=no if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi . /lib/lsb/init-functions # Now, set defaults: APACHE2CTL="$ENV apache2ctl" HTCACHECLEAN="$ENV htcacheclean" PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) APACHE2_INIT_MESSAGE="" CONFTEST_OUTFILE= cleanup() { if [ -n "$CONFTEST_OUTFILE" ] ; then rm -f "$CONFTEST_OUTFILE" fi } trap cleanup 0 # "0" means "EXIT", but "EXIT" is not portable apache_conftest() { [ -z "$CONFTEST_OUTFILE" ] || rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE=$(mktemp) if ! $APACHE2CTL configtest > "$CONFTEST_OUTFILE" 2>&1 ; then return 1 else rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE= return 0 fi } и #!/bin/sh ### BEGIN INIT INFO # Provides: apache2 # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop apache2 web server # Description: Start the web server and associated helpers # This script will start apache2, and possibly all associated instances. # Moreover, it will set-up temporary directories and helper tools such as # htcacheclean when required by the configuration. ### END INIT INFO DESC="web server" NAME=apache2 DAEMON=/usr/sbin/$NAME SCRIPTNAME="${0##*/}" SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" if [ -n "$APACHE_CONFDIR" ] ; then if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" else DIR_SUFFIX= fi elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then DIR_SUFFIX="-${SCRIPTNAME##apache2-}" APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX else DIR_SUFFIX= APACHE_CONFDIR=/etc/apache2 fi if [ -z "$APACHE_ENVVARS" ] ; then APACHE_ENVVARS=$APACHE_CONFDIR/envvars fi export APACHE_CONFDIR APACHE_ENVVARS ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR" fi if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then ENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS" fi #edit /etc/default/apache2 to change this. HTCACHECLEAN_RUN=auto HTCACHECLEAN_MODE=daemon HTCACHECLEAN_SIZE=300M HTCACHECLEAN_DAEMON_INTERVAL=120 HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_cache_disk HTCACHECLEAN_OPTIONS="" # Read configuration variable file if it is present if [ -f /etc/default/apache2$DIR_SUFFIX ] ; then . /etc/default/apache2$DIR_SUFFIX elif [ -f /etc/default/apache2 ] ; then . /etc/default/apache2 fi PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) VERBOSE=no if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi . /lib/lsb/init-functions # Now, set defaults: APACHE2CTL="$ENV apache2ctl" HTCACHECLEAN="$ENV htcacheclean" PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) APACHE2_INIT_MESSAGE="" CONFTEST_OUTFILE= cleanup() { if [ -n "$CONFTEST_OUTFILE" ] ; then rm -f "$CONFTEST_OUTFILE" fi } trap cleanup 0 # "0" means "EXIT", but "EXIT" is not portable apache_conftest() { [ -z "$CONFTEST_OUTFILE" ] || rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE=$(mktemp) if ! $APACHE2CTL configtest > "$CONFTEST_OUTFILE" 2>&1 ; then return 1 else rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE= return 0 fi } по #!/bin/sh ### BEGIN INIT INFO # Provides: apache2 # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop apache2 web server # Description: Start the web server and associated helpers # This script will start apache2, and possibly all associated instances. # Moreover, it will set-up temporary directories and helper tools such as # htcacheclean when required by the configuration. ### END INIT INFO DESC="web server" NAME=apache2 DAEMON=/usr/sbin/$NAME SCRIPTNAME="${0##*/}" SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" if [ -n "$APACHE_CONFDIR" ] ; then if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" else DIR_SUFFIX= fi elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then DIR_SUFFIX="-${SCRIPTNAME##apache2-}" APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX else DIR_SUFFIX= APACHE_CONFDIR=/etc/apache2 fi if [ -z "$APACHE_ENVVARS" ] ; then APACHE_ENVVARS=$APACHE_CONFDIR/envvars fi export APACHE_CONFDIR APACHE_ENVVARS ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR" fi if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then ENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS" fi #edit /etc/default/apache2 to change this. HTCACHECLEAN_RUN=auto HTCACHECLEAN_MODE=daemon HTCACHECLEAN_SIZE=300M HTCACHECLEAN_DAEMON_INTERVAL=120 HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_cache_disk HTCACHECLEAN_OPTIONS="" # Read configuration variable file if it is present if [ -f /etc/default/apache2$DIR_SUFFIX ] ; then . /etc/default/apache2$DIR_SUFFIX elif [ -f /etc/default/apache2 ] ; then . /etc/default/apache2 fi PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) VERBOSE=no if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi . /lib/lsb/init-functions # Now, set defaults: APACHE2CTL="$ENV apache2ctl" HTCACHECLEAN="$ENV htcacheclean" PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) APACHE2_INIT_MESSAGE="" CONFTEST_OUTFILE= cleanup() { if [ -n "$CONFTEST_OUTFILE" ] ; then rm -f "$CONFTEST_OUTFILE" fi } trap cleanup 0 # "0" means "EXIT", but "EXIT" is not portable apache_conftest() { [ -z "$CONFTEST_OUTFILE" ] || rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE=$(mktemp) if ! $APACHE2CTL configtest > "$CONFTEST_OUTFILE" 2>&1 ; then return 1 else rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE= return 0 fi } и #!/bin/sh ### BEGIN INIT INFO # Provides: apache2 # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop apache2 web server # Description: Start the web server and associated helpers # This script will start apache2, and possibly all associated instances. # Moreover, it will set-up temporary directories and helper tools such as # htcacheclean when required by the configuration. ### END INIT INFO DESC="web server" NAME=apache2 DAEMON=/usr/sbin/$NAME SCRIPTNAME="${0##*/}" SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" if [ -n "$APACHE_CONFDIR" ] ; then if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" else DIR_SUFFIX= fi elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then DIR_SUFFIX="-${SCRIPTNAME##apache2-}" APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX else DIR_SUFFIX= APACHE_CONFDIR=/etc/apache2 fi if [ -z "$APACHE_ENVVARS" ] ; then APACHE_ENVVARS=$APACHE_CONFDIR/envvars fi export APACHE_CONFDIR APACHE_ENVVARS ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR" fi if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then ENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS" fi #edit /etc/default/apache2 to change this. HTCACHECLEAN_RUN=auto HTCACHECLEAN_MODE=daemon HTCACHECLEAN_SIZE=300M HTCACHECLEAN_DAEMON_INTERVAL=120 HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_cache_disk HTCACHECLEAN_OPTIONS="" # Read configuration variable file if it is present if [ -f /etc/default/apache2$DIR_SUFFIX ] ; then . /etc/default/apache2$DIR_SUFFIX elif [ -f /etc/default/apache2 ] ; then . /etc/default/apache2 fi PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) VERBOSE=no if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi . /lib/lsb/init-functions # Now, set defaults: APACHE2CTL="$ENV apache2ctl" HTCACHECLEAN="$ENV htcacheclean" PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) APACHE2_INIT_MESSAGE="" CONFTEST_OUTFILE= cleanup() { if [ -n "$CONFTEST_OUTFILE" ] ; then rm -f "$CONFTEST_OUTFILE" fi } trap cleanup 0 # "0" means "EXIT", but "EXIT" is not portable apache_conftest() { [ -z "$CONFTEST_OUTFILE" ] || rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE=$(mktemp) if ! $APACHE2CTL configtest > "$CONFTEST_OUTFILE" 2>&1 ; then return 1 else rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE= return 0 fi } по #!/bin/sh ### BEGIN INIT INFO # Provides: apache2 # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop apache2 web server # Description: Start the web server and associated helpers # This script will start apache2, and possibly all associated instances. # Moreover, it will set-up temporary directories and helper tools such as # htcacheclean when required by the configuration. ### END INIT INFO DESC="web server" NAME=apache2 DAEMON=/usr/sbin/$NAME SCRIPTNAME="${0##*/}" SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" if [ -n "$APACHE_CONFDIR" ] ; then if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" else DIR_SUFFIX= fi elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then DIR_SUFFIX="-${SCRIPTNAME##apache2-}" APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX else DIR_SUFFIX= APACHE_CONFDIR=/etc/apache2 fi if [ -z "$APACHE_ENVVARS" ] ; then APACHE_ENVVARS=$APACHE_CONFDIR/envvars fi export APACHE_CONFDIR APACHE_ENVVARS ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR" fi if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then ENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS" fi #edit /etc/default/apache2 to change this. HTCACHECLEAN_RUN=auto HTCACHECLEAN_MODE=daemon HTCACHECLEAN_SIZE=300M HTCACHECLEAN_DAEMON_INTERVAL=120 HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_cache_disk HTCACHECLEAN_OPTIONS="" # Read configuration variable file if it is present if [ -f /etc/default/apache2$DIR_SUFFIX ] ; then . /etc/default/apache2$DIR_SUFFIX elif [ -f /etc/default/apache2 ] ; then . /etc/default/apache2 fi PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) VERBOSE=no if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi . /lib/lsb/init-functions # Now, set defaults: APACHE2CTL="$ENV apache2ctl" HTCACHECLEAN="$ENV htcacheclean" PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) APACHE2_INIT_MESSAGE="" CONFTEST_OUTFILE= cleanup() { if [ -n "$CONFTEST_OUTFILE" ] ; then rm -f "$CONFTEST_OUTFILE" fi } trap cleanup 0 # "0" means "EXIT", but "EXIT" is not portable apache_conftest() { [ -z "$CONFTEST_OUTFILE" ] || rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE=$(mktemp) if ! $APACHE2CTL configtest > "$CONFTEST_OUTFILE" 2>&1 ; then return 1 else rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE= return 0 fi } и #!/bin/sh ### BEGIN INIT INFO # Provides: apache2 # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop apache2 web server # Description: Start the web server and associated helpers # This script will start apache2, and possibly all associated instances. # Moreover, it will set-up temporary directories and helper tools such as # htcacheclean when required by the configuration. ### END INIT INFO DESC="web server" NAME=apache2 DAEMON=/usr/sbin/$NAME SCRIPTNAME="${0##*/}" SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" if [ -n "$APACHE_CONFDIR" ] ; then if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" else DIR_SUFFIX= fi elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then DIR_SUFFIX="-${SCRIPTNAME##apache2-}" APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX else DIR_SUFFIX= APACHE_CONFDIR=/etc/apache2 fi if [ -z "$APACHE_ENVVARS" ] ; then APACHE_ENVVARS=$APACHE_CONFDIR/envvars fi export APACHE_CONFDIR APACHE_ENVVARS ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR" fi if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then ENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS" fi #edit /etc/default/apache2 to change this. HTCACHECLEAN_RUN=auto HTCACHECLEAN_MODE=daemon HTCACHECLEAN_SIZE=300M HTCACHECLEAN_DAEMON_INTERVAL=120 HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_cache_disk HTCACHECLEAN_OPTIONS="" # Read configuration variable file if it is present if [ -f /etc/default/apache2$DIR_SUFFIX ] ; then . /etc/default/apache2$DIR_SUFFIX elif [ -f /etc/default/apache2 ] ; then . /etc/default/apache2 fi PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) VERBOSE=no if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi . /lib/lsb/init-functions # Now, set defaults: APACHE2CTL="$ENV apache2ctl" HTCACHECLEAN="$ENV htcacheclean" PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) APACHE2_INIT_MESSAGE="" CONFTEST_OUTFILE= cleanup() { if [ -n "$CONFTEST_OUTFILE" ] ; then rm -f "$CONFTEST_OUTFILE" fi } trap cleanup 0 # "0" means "EXIT", but "EXIT" is not portable apache_conftest() { [ -z "$CONFTEST_OUTFILE" ] || rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE=$(mktemp) if ! $APACHE2CTL configtest > "$CONFTEST_OUTFILE" 2>&1 ; then return 1 else rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE= return 0 fi } по #!/bin/sh ### BEGIN INIT INFO # Provides: apache2 # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop apache2 web server # Description: Start the web server and associated helpers # This script will start apache2, and possibly all associated instances. # Moreover, it will set-up temporary directories and helper tools such as # htcacheclean when required by the configuration. ### END INIT INFO DESC="web server" NAME=apache2 DAEMON=/usr/sbin/$NAME SCRIPTNAME="${0##*/}" SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" if [ -n "$APACHE_CONFDIR" ] ; then if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" else DIR_SUFFIX= fi elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then DIR_SUFFIX="-${SCRIPTNAME##apache2-}" APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX else DIR_SUFFIX= APACHE_CONFDIR=/etc/apache2 fi if [ -z "$APACHE_ENVVARS" ] ; then APACHE_ENVVARS=$APACHE_CONFDIR/envvars fi export APACHE_CONFDIR APACHE_ENVVARS ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR" fi if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then ENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS" fi #edit /etc/default/apache2 to change this. HTCACHECLEAN_RUN=auto HTCACHECLEAN_MODE=daemon HTCACHECLEAN_SIZE=300M HTCACHECLEAN_DAEMON_INTERVAL=120 HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_cache_disk HTCACHECLEAN_OPTIONS="" # Read configuration variable file if it is present if [ -f /etc/default/apache2$DIR_SUFFIX ] ; then . /etc/default/apache2$DIR_SUFFIX elif [ -f /etc/default/apache2 ] ; then . /etc/default/apache2 fi PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) VERBOSE=no if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi . /lib/lsb/init-functions # Now, set defaults: APACHE2CTL="$ENV apache2ctl" HTCACHECLEAN="$ENV htcacheclean" PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE) APACHE2_INIT_MESSAGE="" CONFTEST_OUTFILE= cleanup() { if [ -n "$CONFTEST_OUTFILE" ] ; then rm -f "$CONFTEST_OUTFILE" fi } trap cleanup 0 # "0" means "EXIT", but "EXIT" is not portable apache_conftest() { [ -z "$CONFTEST_OUTFILE" ] || rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE=$(mktemp) if ! $APACHE2CTL configtest > "$CONFTEST_OUTFILE" 2>&1 ; then return 1 else rm -f "$CONFTEST_OUTFILE" CONFTEST_OUTFILE= return 0 fi } 

  • Linux Mint Olivia не обнаруживает графику HD4000 Intel
  • Копирование содержимого буфера обмена в файл автоматически и непрерывно?
  • Должны ли использоваться «invoke-rc.d» или «service» для перезапуска служб?
  • На экране входа в Mint разная раскладка клавиатуры для каждого пользователя
  • Загрузка Firefox - как получить возможность открывать
  • Как играть в MIDI-файл в Linux Mint 18 Cinnamon (используя любой аудиоплеер)?
  • Установите настройки звука на 152% при загрузке (LMDE)
  • Помощь с MultiCD
  • One Solution collect form web for “Переменные Apache2 Evironment Отсутствуют при загрузке”

    Я обнаружил проблему. Для запуска команды / usr / sbin / apache2 -V необходимо сначала перенести переменные среды apache. Я неправильно интерпретировал результаты. Делая это

    источник / etc / apache2 / envvars; / usr / sbin / apache2 -V

    работает просто отлично.

    Interesting Posts

    бесплатное программное обеспечение для редактирования видео для Linux с автосогласованием аудиодорожек

    Можно ли импортировать папку vmail из старого iRedMail в новую установку iRedMail?

    Сортировка unix в алфавитном порядке, а затем в численном выражении, не работающая по назначению

    Найти, если какая-либо строка файла является подмножеством данных в другом файле

    Как выбрать, какую графическую карту использовать?

    Ошибка при создании bfilter

    Можно ли интегрировать сервисы Apple iCloud (например, контакты, календари) с Fedora 20?

    Путаница о sed и '>'

    Как определить IP-адрес того, кто зарегистрировался в Root?

    Создайте подмножество debian repo

    Серийный файл – нет добавления

    как отключить диалоги gcr-prompter?

    Как остановить bash от зависания при попытке запуска программ, в то время как NFS нарушена

    Невостребованное устройство в lshw

    Тестирование кода на C ++ с помощью команд bash

    Linux и Unix - лучшая ОС в мире.