Sunday, June 14, 2009

Securing the apache2 web server with SSL in Linux

This was done in ubuntu 9.04 jaunty

First enable the mod-rewrite module of the apache2 web server :

cd /etc/apache2
cd mods-enabled
sudo ln -s ../mods-available/rewrite.load rewrite.load

Then add the pre-configured virtual host that will work over SSL

cd /etc/apache2
cd sites-enabled
sudo ln -s ../sites-available/default-ssl 000-default-ssl

To forward all not-SSL requests (port 80) to the SSL host, add the following lines in the virtual host for port 80 (on ubuntu, it is the file called sites-available/default) :

RewriteEngine On
RewriteRule ^(.*)$ https://myroundcubeserver.mydomain.com$1

Friday, June 5, 2009

MD5SUM for windows

To be able to compute/verify MD5 sums of files under Windows, use the free software called "digestIT 2004". Download it from http://www.colonywest.us/

Downloading free TerraSAR-X demo files from Linux

Use lftp :

lftp -p 990 -du infoterra,itd delivery.infoterra.de

Thursday, June 4, 2009

Converting a kmz file into shapefile format in R

ogr does not recognize the .kml file unzipped from the .kmz file :o(

$unzip infile.kmz
Archive: infile.kmz
inflating: doc.kml
$ ogrinfo doc.kml
FAILURE:
Unable to open datasource `gocek_revised_20090604_AC.kml' with the following drivers.
...
-> KML
...

so I use gpsbabel to convert the .kml file into gpx format :

gpsbabel -i kml -f doc.kml -o gpx -F doc.gpx

I then load the gpx file into Quantum GIS using the GPS plugin. Then I output the loaded layer into shapefile.

I am sure smarter ways to achieve this exist but that's what I could come up with this fast using OpenSource tools.

vive l'OpenSource!