I am a newby in deploying web application. I have done a little web-gis app using Django in PyCharm and utilizing Osgeo libraries and drivers with Python37.

I have deployed the web server using apache2, but without display Leaflet maps.

Here's the Apache configuration:

LoadFile "C:/OSGeo4W/apps/Python37/python37.dll"  
LoadModule wsgi_module "C:/OSGeo4W/apps/Python37/lib/site-packages/mod_wsgi/server/mod_wsgi.cp37-win32.pyd"  
WSGIPythonHome "C:/OSGeo4W/apps/Python37"

WSGIScriptAlias /  "C:/PycharmProjects/webgis1/webgis/wsgi.py"  
WSGIPythonPath "C:/PycharmProjects/webgis1"  
WSGIApplicationGroup %{GLOBAL}

<Directory "C:/PycharmProjects/webgis1">  
    <Files wsgi.py>  
         Order deny,allow  
         Allow from all  
Alias /static "C:/PycharmProjects/webgis1/static"  
<Directory "C:/PycharmProjects/webgis1/static">  
      Order deny,allow  
      Allow from all  

I used the mod_wsgi module. Could anyone help me understand how to configure Apache to view Leaflet maps?

I'm using:
- mod_wsgi 4.7.0
- PyCharm 2019.3.1
- Apache2.2
- Django3
- django-leaflet
- Python37
- Osgeo32-bit

This works for me, I can see the web site at http://localhost:8080/, but I can't display the maps. I used PostGIS database to store vector data and Leaflet for base maps.

I tried to use WSGIProcessGroup but I didn't understand how it works, and on the net I didn't find much material about it.

  • 1
    Please improve your post formatting. It is barely readable. – Stefan Jan 21 at 19:25
  • 1
    I tried to reformat the post, it seems clearer now. – nicola frosi Jan 21 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.