[OSM-dev] Serving multiple maps with one server

Jaume Figueras jaume.figueras at masafi.cat
Wed Sep 24 18:54:04 BST 2008


Hello,

I'm experimenting with OSM data, Mapnik and mod_tile. I set up a server 
with the planet and works perfectly, but now I would like to serve 
different maps with different information using the same computer.

I set up a new database, populate it, and tested it using the generate 
tiles and a new xml file. Perfect.

So I tried to serve it with mod_tile. Since mod_tile and renderd uses a 
lot of compiled parameters I thought that a solution would be compiling 
another mod_tile as my_mod_tile and loading both in apache. So I copied 
all the mod_tile soft to a new directory, say my_mod_tile, changed the 
parameters (names, directories, etc) in render_config.h, changed the 
filenames to my_mod_tile, changed the module name inside my_mod_tile.c 
changed the Makefile and modules.mk filenames acordingly, changed the 
socket in protocol.h, compiled it and correct some changed-name-errors 
and get the my_mod_tile.so installed in apache.

Loaded the module in apache and get nothing. ??? So I began a try and 
error procedure. I unloaded he original mod_tile and my_mod_tile worked! 
I unloaded my_mod_tile and loaded mod_tile and mod_tile worked 
perfectly. I loaded both mod_tile and my_mod_tile and mod_tile worked 
and my_mod_tile not. I changed the order, first loaded my_mod_tile and 
then mod_tile and my_mod_tile worked and mod_tile not.

I don't know nothing about developing modules in apache, but this 
behaviour could be some shared resource? So I changed the hook functions 
names in my_mod_tile.c, in order to prevent a possible conflict when 
loading and registering the module in apache. No improvement. Then I 
also changed the name of all static variables in my_mod_tile.c. No 
improvement. Then I also changed all function names, nothing. Allways 
the same, they work perfectly independently by just one when together.

I've searched the archives but didn't find nothing about it. Any 
suggestions? Anyone has tried to do something similar?

Sorry for my english.

TIA,

Jaume.




More information about the dev mailing list