0

I am trying to host my Django application on Windows 2016 server IIS server. I had used Python, Django, pipenv as virtual environment and PostgreSQL as Database. How to host is using a Domain Name ?

I had tried almost tried everything available on the internet but till now I am not successful. Maybe I have not got the perfect tutorials or find the correct one to host the Django Application.

Please help me host the Django Application on IIS 10.

I will be really grateful for the help

Thanks in advance.

Error occurred while reading WSGI handler:

Traceback (most recent call last):
  File "c:\users\sachin kumar\.virtualenvs\login-zru7l_54\lib\site-packages\wfastcgi.py", line 791, in main
    env, handler = read_wsgi_handler(response.physical_path)
  File "c:\users\sachin kumar\.virtualenvs\login-zru7l_54\lib\site-packages\wfastcgi.py", line 633, in read_wsgi_handler
    handler = get_wsgi_handler(os.getenv("WSGI_HANDLER"))
  File "c:\users\sachin kumar\.virtualenvs\login-zru7l_54\lib\site-packages\wfastcgi.py", line 586, in get_wsgi_handler
    raise Exception('WSGI_HANDLER env var must be set')
Exception: WSGI_HANDLER env var must be set

StdOut:

StdErr:

wowkin2
  • 5,895
  • 5
  • 23
  • 66
  • 1
    Your desired setup SCREAMS for something different than Windows. While it is possible it's going to be substantially harder to set up as on any UNIX like system. And BTW server setup is not a Stack Overflow topic. – Klaus D. Sep 15 '20 at 04:22
  • I think you can find the answer at https://stackoverflow.com/questions/49441038/flask-wfastcgi-and-iis-on-windows-server-2012 –  Sep 18 '20 at 05:06

1 Answers1

1
  1. Check your settings of FASTCGI Module and add needed environment variables
  2. Full docs from Microsoft to run python scripts on IIS are here

offtop: don't use space in your user_name (and in the user folder respectively).

fanni
  • 1,149
  • 8
  • 11