Archive

selfnote: How to handle multiple domains with one apache vhost in a smart way

Today a customer asked for hosting several domains with different content on one apache virtual host. The little tricky part was, that the sites should not be accessed by subdirs like http://domain20.org/subdir20/ and http://domain21.org/subdir21/ which can be done with a little script which parses the $_SERVER['HTTP_HOST']. So mod_rewrite is an option.
To make it user accessable, we use .htaccess. This requires “AllowOverride +FileInfo” to be set for the DocumentRoot in the vhost config. The .htaccess in DocumentRoot could look something like:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} domain10.org$ [OR]
RewriteCond %{HTTP_HOST} domain11.org$
RewriteCond %{REQUEST_FILENAME} !dir1/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule (.*) dir1/$1 [L]
RewriteCond %{HTTP_HOST} domain20.org$ [OR]
RewriteCond %{HTTP_HOST} domain21.org$
RewriteCond %{REQUEST_FILENAME} !dir2/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule (.*) dir2/$1 [L]

bit nagios-plugin bugsquashing, stalling policyd-weight and my first perl module package

Last week I did again some work on nagios-plugins. After the announcement of Dann Frazier to upload NMU to fix a trivial bug, I thought it’s time again to give some extra care to the package. So I prepared 1.4.11-2 fixing the important bugs and uploaded it. I also commited some minor fixes to the svn, so these issues will get fixed by the next upload.

Since the development of policyd-weigh stalled and unfortunately maybe get stuck, I was looking for an alternative, which maybe found with postfwd. It’s quite flexible but it also will take more time (and care!) to get a reliable configuration, which maybe effective as policyd-weight (still) is right now. While checking the dependencies for postfwd I noticed that Net::DNS::Async isn’t available in Debian (yet). So I decided to create a package starting with dh-make-perl, join the Debian Perl Group and let it review. Damyan Ivanov was so kind to review and upload it, Gregor Herrmann did also give some much useful hints. Thanks to both!

And yes, I also found time to step forward with NM, since I was overloaded the last weeks with usual work and life. Thank to my AM to be so appreciative.

10th Chemnitz Linux Days

Like Meike already told, it was a nice event, like always. IMHO it’s based on the good balance of community and a small amount of business booth and of course the visitors.
This year we was apart the Sidux Project. Didn’t heared about (much) before, but their slogan is Hot & Spicy! Maybe ‘hot’, cause it’s based on Debian unstable. Hopefully you won’t get tears if it’s too spicy. Anyways … if you want, you could take a look. My opinion is, this would be a good case for a Custom Debian Distribution, if there would be a requirement for it. But he.. everybody is free to do, what ever he want, if nobody else is restricted.
The talks I attended was in most cases excellent, some of them was funny … only one of them did really suck. Desktop Virtualision … after the talk, my question if there could anything else virtualized then the OS from Redmond, was answered with ‘Unfortunetly only XP’ … how lovely!

Routing Suite in an ISP environment?

Searching for an alternative for our old Cisco Border Router we are evaluating some software routing suites on “normal” server hardware.
First we tried Vyatta, but the routing software frequently crashed completly. Maybe this is fixed with VC4 Alpha 1, but we didn’t test that.
Next try was the development version (0.99.9) of quagga from Debian testing, but it looks like a peering with one of our cisco router fails after the hold timer expires. Continue reading ‘Routing Suite in an ISP environment?’