Python Forum
Python to IIS 8? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Python to IIS 8? (/thread-19996.html)



Python to IIS 8? - D_4nt_32p0 - Jul-23-2019

Good day, is there a way to move a site from a python web server (compiled in python) to IIS 8?


RE: Python to IIS 8? - DeaD_EyE - Jul-23-2019

https://medium.com/@bilalbayasut/deploying-python-web-app-flask-in-windows-server-iis-using-fastcgi-6c1873ae0ad8


RE: Python to IIS 8? - D_4nt_32p0 - Jul-23-2019

Under the section “Setting Up Windows Environment For Python”, what are the system environment variables?


RE: Python to IIS 8? - DeaD_EyE - Jul-23-2019

Environment Variables are available for all programs you run.
Programs look them up, if needed.

The variable PYTHONPATH seems to point to the webroot, where the Python files are.
The WSGI_HANDLER is points to your app.

from flask import Flask


app = Flask(__name__)
# this is the app object, where
# the HANDLER connects


@app.route('/')
def root():
    return 42


# this following code
# is not executed, if it's started
# by WSGI.

if __name__ == '__main__':
    app.run()
If this file is called foo.py, then the value of WSGI_HANDLER is foo.app.


RE: Python to IIS 8? - D_4nt_32p0 - Jul-23-2019

it seems I hit a sang in the instructions. The WfastCGI 2.1 gateway…can no longer be downloaded? The Web Installer points to a location that is no longer available, and the direct link point to CodePlex which is gone? do you know where I can download the file(s)?

My guess would be to download “FastCGI for IIS” then install Python 3.x separately? Where would I go from there? would the instructions be good beyond that point?

Also what would the “Variable Name” and “Variable Path” be when editing the system variables?