Root server settings and Environment Variables

Go to the root server settings and click on the FastCGI Settings icon. Double-click on the argument that matches the path added in the previous section. The Edit FastCGI Application interface will open.

  • Click on the EnvironmentVariables (Collection) entry. An ellipsis (...) will appear. Double-click on the ellipsis to edit the environment variables.
  • Click the Add button to add a new variable.
  • Add PYTHONPATH to the Name entry.
  • Add the path to the site code (for example C:\website\) to the value entry.
  • Click the Add button to add a second variable.
  • Add WSGI_HANDLER to the Name entry.
  • If the site is controlled by a file called app.py, add app.app to the value entry (replacing .py with .app).

Get Mastering Geospatial Analysis with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.