Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # WSGI module for use with Apache mod_wsgi
- import os
- from paste.deploy import loadapp
- # this is not working
- # application = loadapp('config:config.ini', relative_to=os.path.dirname(__file__))
- # placing the path to the etc folder directly
- application = loadapp('config:config.ini', relative_to="c:\\gis\\mapproxy_venv\\apvmapproxy\\etc")
- #
- # isapi-wsgi specific
- # FROM http://code.google.com/docreader/#p=isapi-wsgi&s=isapi-wsgi&t=IntegrationWithDjango
- #
- import isapi_wsgi
- # The entry points for the ISAPI extension.
- def __ExtensionFactory__():
- return isapi_wsgi.ISAPISimpleHandler(application)
- if __name__=='__main__':
- # If run from the command-line, install ourselves.
- from isapi.install import *
- params = ISAPIParameters()
- # Setup the virtual directories - this is a list of directories our
- # extension uses - in this case only 1.
- # Each extension has a "script map" - this is the mapping of ISAPI
- # extensions.
- sm = [
- ScriptMapParams(Extension="*", Flags=0)
- ]
- vd = VirtualDirParameters(Name="mapproxy",
- Description = "ISAPI-WSGI ISAPISimpleHandler MapProxy",
- ScriptMaps = sm,
- ScriptMapUpdate = "replace"
- )
- params.VirtualDirs = [vd]
- HandleCommandLine(params)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement