Category Archives: IT

Apache2 Mass Virtual Hosting

I’m preparing an IPv6 server to host all my projects. It’s so nice to start with a clean one.

First thing, I’ll use Apache2 with his wonderful Mass Virtual Hosting.
This will allow me to create a new web site named only by creating the following directory : /home/hosts/

Nice isn’t it ?

I’m following this article:

Here are all the command I used for Mass Hosting on Debian Etch:

root@strange:/etc/apache2/mods-enabled# ln -s ../mods-available/vhost_alias.load
mkdir /home/websites
mkdir /home/websites/
mkdir /home/websites/ (for my online files)
mkdir /home/websites/ (where I keep documents about the website)

Then I just replaced the content of /etc/apache2/sites-enabled/000-default by:

# get the server name from the Host: header
UseCanonicalName Off
# this log format can be split per-virtual-host based on the first field
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog /var/log/apache2/access_log vcommon
# include the server name in the filenames used to satisfy requests
VirtualDocumentRoot /home/websites/%0/online
VirtualScriptAlias /home/websites/%0/cgi-bin

Here we are… just have to configure’s IP

Next step : SVN Server. I’ll keep a backup of every versions of my projects…

Apple Dock?

Just one word: Wow!

A patent application submitted in 2006 and published for the first time today has revealed that Apple is working on a docking station for portable computers, the exterior of which closely resembles Apple’s iMac line of desktop computers.

A docking station is disclosed. The docking station includes a display and a housing configured to hold the display in a manner that exposes a viewing surface of the display to view. The housing defines a docking area configured to receive a portable computer; The docking area is at least partly obscured by the display when viewed from the viewing surface side of the display at an angle substantially orthogonal to the viewing surface.

Apple argues that its docking station concept is superior in that it requires less desk space due to its vertical orientation. It is also simpler, as the display is integrated and wireless network technologies will be employed for communication between the dock and the portable.

There has been some speculation around the internet that the patent could be tied to the rumored Apple ultra-portable. While the timing of the publication is interesting, the application itself remains generic in nature, and appears to be applicable to any notebook computer.

from IPv4 to IPv6

If you are on an IPv6 network, you can access to an IPv4 address. We just have to use the 2002: prefix.
for exemple can be converted to hexadecimal : 9D36:1. So we can contact it via 2002:9D36:1::

ISATAP (Intra-Site Automatic Tunnel Addressing Protocol)
If you are on an IPv4 network, you can be contacted via an IPv6 address:
[64bits prefix]:0:5EFE: and the 32bits of the IPv4 address
For exemple : FE80::5EFE:

If you cannot use 6to4 because of NAT you may use Teredo.
Teredo Prefix is: 2001:0000::/32.

Airport Express and FrontRow on Leopard

Airport Express

What a shame!

Front Row 2 doesn’t work with Air Tunes! It was so fine with Front Row 1.3… and Leopart (Mac OS 10.5) includes Front Row 2 only.

I found how to downgrade here and in french here.

Here is the solution, just in case:

As you may know FrontRow 2.0 misses on important FrontRow 1.x features. Opening it without stopping the music. That is why we downgrade Frontrow to 1.x :)

First get the Front Row 1.3 Update: and mount the Image.

Open a Terminal (Applications -> Utilities ->

Backup your Front Row 2.0

sudo mv /System/Library/CoreServices/Front\ /System/Library/CoreServices/Front\ Row.app2.0

Once the image mounted you can right click on the package and chose “show package contents”
Then, in “Content” double click on “Archive.pax.gz”. A folder named “Archive” will be added to you download folder.
Then go in Archive > System > Library > Coreservice
Copy (command C) FrontRow. Then go to you local Hard Drive and past it in system > library > coreservice

(I didn’t need a restart for Front Row to work again)

If you want to come back to Front Row 2.0 :

  • sudo mv /System/Library/CoreServices/Front\ /System/Library/CoreServices/Front\ Row.app1.0
  • sudo mv /System/Library/CoreServices/Front\ Row.app2.0 /System/Library/CoreServices/Front\

And back to Front Row 1 again :

  • sudo mv /System/Library/CoreServices/Front\ /System/Library/CoreServices/Front\ Row.app2.0
  • sudo mv /System/Library/CoreServices/Front\ Row.app1.0 /System/Library/CoreServices/Front\

Spamassassin can learn from Exchange

Stop Spam

Our users asked me to improve the antispam system.

We use Exchange 2003 but the antispam/antivirus system is on a linux debian etch. The only way I could think about was to let spamassassin learn.

The command “sa-learn –spam /rep/” can only read mbox formatted emails.
The solution came from imap2mbox .

Very easy to schedule on my Windows server
imap2mbox.exe --config="c:\imap2mbox\spam.cfg" --path="Pubic Folders/" --folder="SPAM/" --server=YourExchangeServer --delete --username="username" --mbox="c:\shared_folder\spam.mbox" --pass=yourpassword

I had to replace "Pubic Folders/" by "Dossiers publics/" because our Exchange is French.
Then we have to put the mails in the public folder SPAM.

On my debian server I just added a crontab entry for the I created:

#connexion Samba
mount -t cifs ${smbserver} ${rep_sauv_dist} -o "user=${smbuser},pass=${smbpwd}"
if test -f ${rep_sauv_dist}/verif.txt; then
/usr/bin/sa-learn --spam ${rep_sauv_dist}/spam.mbox
rm -f ${rep_sauv_dist}/spam.mbox
texte="spamassassin learning ok"
echo $texte # | mail ${email} -s "Apprentissage SpamAssassin OK"
texte="Error: spamassassin learning error, connexion samba impossible"
echo $texte # | mail ${email} -s "Error Spamassassin learning"
umount ${rep_sauv_dist}