awstats workaround for custom delimiter tab methodurl bug

For some sites i am using the venerable awstats to keep track of web site statistics; and came across a problem today:

If your apache LogFormat is using a \t (tab) to separate fields you may notice how awstats does not parse %methodurl correctly – instead it looks like your two top pages are called HTTP/1.0 and HTTP/1.1. Read more for a workaround.

[Read more...]

Create your blog with TYPO

typo_admin_login

General Information

Typo is a Ruby on Rails application and in this article you can find how to install Typo v. 4.1.1 easily in a few steps on FreeBSD 6/7.

[Read more...]

Making hyperlinks work between Firefox and Thunderbird

General Information

This guide will help you install Firefox and Thunderbird. This guide will also explain how to configure Thunderbird to open http, https, and ftp links in Firefox and how to configure Firefox to open mailto links in Thunderbird.

[Read more...]

Installing and Configuring X.org and KDE

xorgcfg1

General Information

This guide demonstrates the ease of installing Xorg and KDE on FreeBSD 5.x.

[Read more...]

Enable setuid In Perl

General Information

There may be times you would want to run perl scripts as non-root users. This offers more security to your system and this guide will show you how to enable perl to use setuid.

[Read more...]

Setting Up phpMyAdmin

General Information

If you are a point-and-click kind of person and have to manage one or more MySQL servers, you may find this web-based utility to be a goldmine.

[Read more...]

Folding@Home using daemontools

General Information

This guide will help you set up Folding@Home using Dan Bernstein’s daemontools, for easy maintenance and also so that on a server reboot folding@home automatically comes back up.

Requirements

You will need the following items to be able to complete this guide:

  1. Root access to a FreeBSD machine
  2. Daemontools running
  3. Linux compatibility installed

Installing Linux Compat

Folding@home only makes Linux binaries. If you do not have the Linux emulation mode enabled, then run the following command:

# pkg_add -r linux_base-8
# echo 'linux_enable="YES"' >> /etc/rc.conf

If you wish, you can compile from source, using the /usr/ports/emulators/linux_base-8/

At this point you need to restart, for the new linux emulation mode to become enabled.

# shutdown -r now

Setting up Folding@home

Here one creates the service directory and also a directory where the Folding@home client is run.

# mkdir /usr/local/folding@home/
# mkdir /usr/local/folding@home/root

Next we need to get the binary. Yes this is the Linux binary eventhough it contains an .exe extension.

# cd /usr/local/folding@home/root/
# fetch http://www.stanford.edu/group/pandegroup/release/FAH502-Linux.exe
# chmod +x FAH502-Linux.exe
# brandelf -t Linux FAH502-Linux.exe

You can always get the latest version of the client at http://folding.stanford.edu/download.html.

# mkdir /usr/local/folding@home/log
# mkdir /usr/local/folding@home/env
# mkdir /usr/local/folding@home/log/main

We create the directory structure needed for folding@home to be run under Dan Bernstein’s daemontools. We also need to chown/chmod them to the right permissions:

# cd /usr/local/folding@home
# chown -R nobody:nobody root env log/main
# chmod 2755 root log log/main

Now before doing anything else, we need to get the client set up. You need to give it a username to be able to say that you contributed, or you can stay anonymous.

# cd root
# setuidgid nobody ./FAH502-Linux.exe -configonly
# cd ..

Next set up the run file, this is the most important file, as it runs your Folding@home client using daemontools’ supervise, which will make sure it is always up.

# cat << EOF > run
# #!/bin/sh
# exec 2>&1
# exec envdir ./env sh -c '
#  cd /usr/local/folding@home/root/
#  exec setuidgid nobody /usr/bin/nice -n 20 /usr/local/folding@home/root/FAH502-Linux.exe -freeBSD
# '
# EOF
# chmod 700 run

Logging is important. Of course, we want to know how far along we are.

# cat << EOF > log/run
# #!/bin/sh
# exec setuidgid nobody multilog t ./main
# EOF
# chmod 700 log/run

Starting Folding@home

Now, to get Folding@Home started using svscan and have it running under supervise, we have to let svscan know about our service.

# cd /var/service
# ln -s /usr/local/folding@home

It should now be running, to see if it really is running, check with ps.

# ps auxwwww | grep -i fah

You should see several different processes named FAH*-Core.exe, this means you are good to go. To check how long it has been running, use svstat like follows:

# svstat /var/service/folding@home/

Use the CD or DVD Device Icons in KDE

General Information

KDE can place icons for specific devices such as CD-Roms, DVD-Roms, Cameras, etc. The idea is to click on this icon and the device will automatically be mounted and Konqueror will open showing the contents of the mounted device.

[Read more...]

Using Subversion for Collaborative Development FreeBSD

General Information

Subversion (SVN) is an alternative to using Concurrent Version System (CVS) for collaborative development, though it has other uses if you develop on more than one machine and wish to keep all your work in a central location. This guide will show you how to setup Subversion with Webaccess via the Apache2 mod_dav svn module. If you already use apache 1.3 you can continue to use that, just change the port that apache2 listens on in its httpd.conf file.

[Read more...]

Setting up IMP Webmail

General Information

When I first set up my mail server, I was faced with a dilemma — which webmail program should I use? I started out with SquirrelMail, but I soon installed vpopmail and needed a webmail client that could support virtual users. So, my next stop was NuralStorm, but it lacked some features I wanted. I had always heard about Horde’s webmail client, but I was always afraid of it because of it’s complexity. This guide aims to ease your mind about IMP and help you install it and get it running from a base system and an updated ports tree.

[Read more...]