Archive for July, 2009

Enable core dumps with apache, RHEL5

If you are like me, you had some trouble getting apache to dump core on a RHEL5 system. The following steps have produced positive results for me:

echo "ulimit -c unlimited >/dev/null 2>&1" >> /etc/profile
echo "DAEMON_COREFILE_LIMIT='unlimited'" >> /etc/sysconfig/init
echo 1 > /proc/sys/fs/suid_dumpable
echo "core.%p" > /proc/sys/kernel/core_pattern
echo "CoreDumpDirectory /var/apache-core-dumps" > \
/etc/httpd/conf.d/core_dumps.conf
mkdir /var/apache-core-dumps
chown apache: /var/apache-core-dumps
source /etc/profile
/etc/init.d/httpd restart

Now you can test it by sending a SIGSEGV to a random apache child process:

# tail -f /var/log/httpd/error_log | grep -i seg &
# ps auxwww |grep httpd (pick a random pid not owned by root)
# kill -11 2014
# [Mon Jul 06 21:05:39 2009] [notice] child pid 2014 exit signal
Segmentation fault (11), possible coredump in /var/apache-core-dumps
# cd /var/apache-core-dumps
# ls
core.2014

You can then get a backtrace using gdb:

# gdb /usr/sbin/httpd core.2014
(gdb) > bt full

I hope this helps someone. Please feel free to comment.

Dragon Age: Origins, Character creation screen

Freaky Dwarf Character

Freaky Dwarf Character

Dragon Age: Origins

Redirect domain.com to www.domain.com, universal

I still get allot of these requests, so I thought I would share this. You can add this rewrite rule to the .htaccess file located at the domains documentroot or in the virtualhost or directory context of the apache configuration to achieve the desired result.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) http://www.%{HTTP_HOST}$1 [QSA,R=301,L]

Return top