Archive for the ‘sysadmin’ category

Installing apache, fastcgi & php-fpm on dragonflybsd

November 18th, 2011

We’re cur­rently in the pro­cess of tran­si­tio­ning our web ser­vers from NetBSD to Dra­gon­flyBSD; along with that, we’re also swit­ching our PHP plat­form to php-fpm. There are a few les­sons we lear­ned in the process.

First: At least on Dra­gon­flyBSD 2.10, apache2 does not at all per­form well as apache-mpm-worker. Swit­ching to apache-mpm-prefork chan­ged our CPU load from 98% of apa­che to about 3 – 5% of apache.

Also, php-fpm was deli­ve­r­ing too high a rate of 500 errors; this was not accep­ta­ble to our cust­o­mers. Inves­ti­ga­ti­ons into that lead me to the blog arti­cle at http://​alexca​bal​.com/​i​n​s​t​a​l​l​i​n​g​-​a​p​a​c​h​e​-​m​o​d​_​f​a​s​t​c​g​i​-​p​h​p​-​f​p​m​-​o​n​-​u​b​u​n​t​u​-​s​e​r​v​e​r​-​m​a​v​e​r​i​c​k​/​#​c​o​m​m​e​nts, which then sent me link-chasing to – ulti­mately – http://​arti​cle​.gmane​.org/​g​m​a​n​e​.​c​o​m​p​.​w​e​b​.​f​a​s​t​c​g​i​.​d​e​v​e​l​/​2​514. This means we now have a set of local patches to our pkgsrc tree that incor­po­rate the patch from this pos­ting. At first sight, this seems to have impro­ved the situation.

Mailman problems

September 1st, 2010

For one of lists, one of the sub­scri­bers had the stran­gest pro­blem. He kept get­ting boun­ces that the list alias does not even exist, whilst at the same time other sub­scri­bers could well write to that list. It turns out that his mail ser­ver was rewri­t­ing the To:-address, resol­ving the CNAME of the host­name that is responsi­ble for run­ning the lists. As we run a virtual-domain based mail ser­ver, this was not a smart choice: Whilst the email address does indeed exist on the CNAME-d host (lists​.xiqit​.de), it does not exist on the fully qua­li­fied name the ser­ver lis­tens to. So we added an MX record for the host­name that also points to the ‚pri­mary‘ name of the ser­ver (the one which the RDNS also resol­ves to), and now all is well. HIs email does reach the list.

PowerDNS under MacOS X 10.6.4

August 26th, 2010

Thanks to an entry on LSD::RELOAD I was finally able to get powerdns to run on my MacOS X 10.6.4 system.

Out of per­so­nal pre­fe­rence I wan­ted it to run with post­gresql instead of mysql, so there was a little figu­ring out invol­ved in how to get things going wit­hout the mysql dri­ver — appa­r­ently, the make files only take one data­base backend and do not com­pile mul­ti­ple dri­vers at the same time.

Also, secon­dary soft­ware omes from Mac­Ports, so paths had to be appro­pria­tely matched. And then, there was some hand-tweaking of Make­files because –Bsta­tic, –Bdy­na­mic and –lcrypt war­rant spe­cial handling.

This leads to the fol­lo­wing com­mand line:

CXXFLAGS="-I/opt/local/include -DDARWIN" \
./configure --with-pgsql-lib=/opt/local/lib/postgresql84 \
--with-pgsql-includes=/opt/local/include/postgresql84 \
--prefix=/usr/local --with-modules="gpgsql"

Ich mag shell …

February 26th, 2009

for i in *.html; do mv $i {$i%.html}.php; done

Und schon sind alle HTML-Dateien PHP-Dateien. Ich mag Shell.

fcgid und http authentication

January 12th, 2009

Dank ever­flux gelöst. Wenn man PHP mit fhc­gid fährt und dann dabei auch noch http authen­ti­ca­tion machen möchte, muss man in der Konfigurations-Datei von apa­che einen Ein­trag ergän­zen. Bei uns steht jetzt in der Sec­tion <ifmodule mod_fcgid.c>noch Passheader Authorization.