Skip to content

Instantly share code, notes, and snippets.

@tonejito
Created March 5, 2014 06:51
Show Gist options
  • Save tonejito/9362386 to your computer and use it in GitHub Desktop.
Save tonejito/9362386 to your computer and use it in GitHub Desktop.
Run apache in DEBUG mode with logging to stdout and optional trace of opened files
#!/bin/bash -vx
# httpd-debug.sh
# Run apache in DEBUG mode with logging to stdout and trace of opened files
# Andres Hernandez - tonejito -
STRACE=`which strace`
APACHE_DEBUG="/usr/sbin/apache2 -X -e debug"
cd /etc/apache2
source envvars
if [ -n "$STRACE" ]
then
$STRACE -e trace=open $APACHE_DEBUG
else
$APACHE_DEBUG
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment