ArchivePage 3 of 42

RESTlet: Selective Guards

When creating RESTful WebServices using the RESTlet API you may wan’t to create a selective Guard, i.e. a password protection for special HTTP methods only. Perhaps you want to allow all GET requests but require authentification for modifying requests like PUT or POST.

In this case you’ll need to extend the Guard class and overwrite the methods authenticate and authorize. An example implementation would look like this:

Continue reading ‘RESTlet: Selective Guards’

Visual Representation of SQL Joins

Coding Horror provides a great visual representation of SQL Joins, just in case you need one.

Apache: Force all Visitors to use HTTPS

When using Apache with SSL you may want to force all Visitors to use HTTPS instead of HTTP.

After configuring Apache for SSL you can achieve this by using this VirtualHost definition:

<VirtualHost <your-ip>:80>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>

You should have the SSL-enabled VirtualHost running on the same IP.

Asus Maximus Formula on Linux

Recently I bought the Asus Maximus Formula Mainboard in replacement for my old and unstable Abit AX8. I did this to get rid of the endless trouble a VIA Chipset can bring you. I did have lots of trouble with the VIA Chipset on the AX8. The board itself actually wasn’t so bad, but the chipset definetly is. The most remarkable problem was that my SATA2 hard drives weren’t recognized when connected to the board. I had to limit them to SATA1 for the board to recognize them. This shouldn’t be a problem in theory since SATA1 can transfer about 150MB/s, but after replacing the board I realized that I did waste a lot of performance on the old board. The hard drives perform much better on the new board. The Maximus Formula seems to be targeted at Gamers, but the board has proven to be rock-solid until now. You get lots of overclocking options but for the time being I won’t touch them. System stability is more important to me than raw speed and I don’t play games that often. Running Linux on the board is super easy. Actually it is more easy than running Windows Vista! Before you ask: I use Vista only for playing games that won’t run on Linux.

Asus Maximus Formula

Continue reading ‘Asus Maximus Formula on Linux’

Buggy Java x86_64?

It looks like Eclipse for Linux x86_64 running on top of an Java for x86_64 is very unstable and crashes from time to time. At least that is what I can gather from my own experience and some reports from the Sun Java Forums. It looks like I have to stay with Java x86 (non-64bit) for a while.

And yes, I’m trying to write more posts in english.

ISP E-Mail Server mit Debian etch und exim 4

Nachdem ich schon einige Jahre sehr zufrieden mit exim als Mailserver bin und immer wieder über Berichte von Personen stolpere die arge Probleme mit der Einrichtung ihres Postfix Mailservers haben bin ich zu dem Schluss gekommen, dass es einfach an einem vernünftigen Tutorial zur einrichtung eines ISP-ähnlichen Mailservers mit exim 4 und Dovecot unter Debian etch mangelt. Anhand des erstklassigen Tutorials zu Postfix habe ich mir überlegt welche Kriterien ein gutes Tutorial erfüllen muss und welche Punkte angesprochen werden müssen. Unter dem Titel ISP Email Server mit Exim 4, Dovecot, MySQL und SpamAssassin auf Debian GNU/Linux etch habe ich ein Tutorial zu dem Thema erstellt, das hoffentlich alle Fragen beantwortet. Für jegliche Kritik - bevorzugt konstruktive - bin ich dankbar.

Das Tutorial ist im Moment noch ein Entwurf und zu ca. 80% fertig. Ich werde versuchen es so schnell wie möglich fertig zu stellen.

Keyword Substitution bei SubVersion

Bei SVN gibt es, wie bei CVS, die Möglichkeit bestimmte Schlüsselwörter in Textdateien automatisch ersetzen zu lassen. Dies sind unter anderem die praktischen Schlüsselwörter $Revision$ für die aktuelle Revisionsnummer der Datei, $Author$ für den Autor sowie $Date$ für das letzte Modifikationsdatum. Dieses Variablen werden immer bei einchecken auf den neusten Stand gebracht. Damit man dieses Feature jedoch nutzen kann muss man es erst über “svn propset svn:keywords “Revision Date Author” filename.ext” aktivieren.

Mehr Informationen im SVN Buch.

GoogleEarth: Fehlercode 29

Nachdem ich mein Problem mit Eclipse lösen konnte, bin ich beim starten von Google Earth auf ein neues interessantes Problem gestoßen. Die installierte Version wollte erstmal gar nicht starten. Na gut, schnell die aktuelle Version runtergeladen (4.3) und installiert. Die ist dann auch gestartet aber die Erde wurde nicht angezeigt. Stattdessen ein “Fehlercode: 29″. In den Hilfeseiten von Google findet man dazu im Moment nichts, aber im Ubunutusersforum. Dort gab es auch die Lösung: Den 32-bit DNS-Resolver installieren.

aptitude install lib32nss-mdns

Eclipse unter Linux x64

Nach der Migration meines Systems von 32-bit auf einen 64-bit Kernel kam es beim Starten von Eclipse zu einer komischen Fehlermeldung:

libgtk2.0-0: error while loading shared libraries: libgtk-x11-2.0.so.0

Der Grund war einfach, dass ich eine 32-bit Version von Eclipse (SWT) hatte und die natürlich die entsprechenden Libraries nicht gefunden hat. Die Lösung habe ich in einem Debian Bugreport gefunden.

ProFTPd offen wie ein Scheunentor

Wie ich gerade lese ist ProFTPd, zumindest mit mod_sql, offen wie ein Scheunentor. Man kann sich mit dem Benutzer “mysql” und dem Passwort “!” einloggen.