[Tilecache] TileCache problems with mod_python
Jim Groffen
jim.groffen at lisasoft.com
Tue May 12 01:40:52 EDT 2009
I can vouch that the following works for me using
apache/mod_python on Windows without modifying
registry settings:
*----------------------------------
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "C:/Sandbox/tilecache">
AddHandler python-program .py
PythonHandler TileCache.Service
PythonOption TileCacheConfig C:/Sandbox/tilecache/tilecache.cfg
PythonPath "['C:/Sandbox/tilecache'] + sys.path"
</Directory>
*---------------------------------
Forward slashes are fine - I think backslashes
would need to be escaped to double backslashes,
but you can avoid any confusion by using forward
slashes, Apache and Python won't mind.
I've been able to configure more complicated
scenarios after hitting similar issues
when playing with Django, which has a useful
guide to mod_python and the common problems
people hit. This might be overly technical
but good if you want to know how to use
mod_python without learning all about Apache
configuration.
http://docs.djangoproject.com/en/dev/howto/deployment/modpython/
Regards,
Jim Groffen.
-----Original Message-----
From: tilecache-bounces at openlayers.org [mailto:tilecache-bounces at openlayers.org] On Behalf Of Yves Moisan
Sent: Tuesday, 12 May 2009 4:13 AM
To: Gissur Þórhallsson
Cc: tilecache at openlayers.org
Subject: Re: [Tilecache] TileCache problems with mod_python
>
>
> My httpd.conf looks like this:
> # --------------------- TILECACHE 2.10 ---------------------
>
>
> Alias /tc/ "C:/Apache Group/Apache2/htdocs/tilecache210/"
> <Directory "C:/Apache Group/Apache2/htdocs/tilecache210/">
> Options +ExecCGI +FollowSymLinks
> AllowOverride Limit
> ExpiresActive on
> ExpiresDefault "now plus 6 hours"
> AddHandler python-program .py
> PythonHandler TileCache.Service
> PythonOption TileCacheConfig 'C:/Apache
> Group/Apache2/htdocs/tilecache210/tilecache.cfg'
> PythonPath "['C:\Apache Group\Apache2\htdocs\tilecache210
> \Tilecache']+sys.path"
> PythonDebug On
> </Directory>
> # --------------------- TILECACHE 2.10 END ---------------------
Here's a setup that works for me
# CGI MODE
<Directory "/ms4w/Apache/tilecache-2.03/">
AllowOverride None
Options None
Order Deny,Allow
Allow from all
</Directory>
# MOD_PYTHON MODE
<Directory "/ms4w/Apache/tilecache-2.03/">
AddHandler python-program .py
# PythonPath "['/ms4w/Apache/tilecache-2.03/tilecache'] +
sys.path "
PythonHandler TileCache.Service
PythonOption TileCacheConfig
"/ms4w/Apache/tilecache-2.03/tilecache.cfg"
</Directory>
Notice the PythonPath directive is actually commented out. Apache on
windows seems to only care about the registry variables to find its
Python Path. At least that's what I found.
HTH,
Yves
>
_______________________________________________
Tilecache mailing list
Tilecache at openlayers.org
http://openlayers.org/mailman/listinfo/tilecache
The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.
More information about the Tilecache
mailing list