#3772 Debian - webmin can't detect apache2 pid

1.520
closed-fixed
Jamie Cameron
5
2010-10-06
2010-10-05
Anonymous
No

Using Debian Squeeze with Apache 2.2.16, webmin doesn't detect the apache-pid file automatically.
I have to tell webmin the path (/var/run/apache2.pid) to the pid file.

Greetings
Julian

Discussion

  • Jamie Cameron
    Jamie Cameron
    2010-10-05

    Webmin should actually get the PID file automatically from /etc/apache2/apache2.conf , in the PidFile directive. Does that not exist on your system?

     
  • RNSsystems
    RNSsystems
    2010-10-06

    Hi,
    here the part of the apache2.conf with the PidFile Directive
    ===== SNIP =====
    # PidFile: The file in which the server should record its process
    # identification number when it starts.
    # This needs to be set in /etc/apache2/envvars
    #
    PidFile ${APACHE_PID_FILE}
    ===== SNAP =====

    and that's the envvars file
    ===== SNIP =====
    unset HOME
    if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
    SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
    else
    SUFFIX=
    fi

    export APACHE_RUN_USER=www-data
    export APACHE_RUN_GROUP=www-data
    export APACHE_PID_FILE=/var/run/apache2$SUFFIX.pid
    export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
    export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
    export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
    export LANG=C
    export LANG
    ===== SNAP =====

    Greetings
    Julian

     
  • Jamie Cameron
    Jamie Cameron
    2010-10-06

    Ok, thanks .. I see the issue now. The fix is to remove $SUFFIX from the lines :

    export APACHE_PID_FILE=/var/run/apache2$SUFFIX.pid
    export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
    export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
    export APACHE_LOG_DIR=/var/log/apache2$SUFFIX

    as it will be empty anyway. I will fix Webmin in future to properly handle this.

    I wish debian didn't use these wierd substitutions in the apache config :-(

     
  • Jamie Cameron
    Jamie Cameron
    2010-10-06

    • status: open --> closed-fixed