1

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:

2
  • 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. Commented Sep 15, 2020 at 4:22
  • I think you can find the answer at stackoverflow.com/questions/49441038/… Commented Sep 18, 2020 at 5:06

1 Answer 1

1
+50
  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).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.