Hello,
I am new to Mapnik and try to set up a WMS server for OSM data. Rendering tiles with mapnik from postgresql DB is no problem and also the "hello world" python script shows up in my browser. The point where I fail is to get the wms.py to show anything. requesting any URL starting with http://localhost/wms.py? ends up with my browser loading for ages and nothing happens. not even an error message. I tried mod_python first, then switched to CGI, but its the same problem. I think the error must be caused in map_factory. Changes made in the process before map_factory is called have an effect and changes in the xml file or the wms?URL have no effect.
my files:

=====
wms.py:
------------
#!/usr/bin/env python
import sys
from mapnik import *
from mapnik.ogcserver.cgiserver import Handler
sys.path.append('/home/mapnik/utils/ogcserver/')
from jon import fcgi
class OGCServerHandler(Handler):
configpath = '/home/mapnik/utils/ogcserver/ogcserver.conf'
fcgi.Server({fcgi.FCGI_RESPONDER: OGCServerHandler}).run()

=====
map_factory.py:
------------
from mapnik import *
from mapnik.ogcserver.WMS import BaseWMSFactory

class WMSFactory(BaseWMSFactory):
def __init__(self):
BaseWMSFactory.__init__(self)
self.loadXML('/home/mapnik/mapnik/osm_test.xml')
self.finalize()

=====
ogcserver.conf:
------------
[server]
module=map_factory
[service]
title=Mapnik OGC Server
abstract=OSM WMS
maxheight=512
maxwidth=512
allowedepsgcodes=4326,900913
onlineresource=http://localhost
fees=
keywordlist=
accessconstraints=
maxage=86400

=====
sites-available/default:
------------
<VirtualHost *:80>
    ServerAdmin [email protected]

    DocumentRoot /var/www
<Directory />
        Options FollowSymLinks
        AllowOverride None
</Directory>

<Directory /var/www>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
        AddHandler mod_python .py
        PythonHandler mod_python.publisher
        PythonDebug On
</Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
</Directory>

    ErrorLog /var/log/apache2/error.log

    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
    Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
=====

I am on Ubuntu Lucid, using Python 2.6.5 and Apache 2.2.14. Its highly apprechiated if anyone can point me where the problem is, as I've been struggling on this for days.
thanks, Daniel
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to