-1

I am trying to deploy Django on local host and "tunnel" using ngrok. The ngrok works but the IIS (Internet Information Manager) gives 500 Error <handler> scriptProcessor could not be found in <fastCGI> application configuration. Reference into fastcgi shows that this feature is deprecated but what is the replacement for serving Django using local server and ngrok. I also pip installed pyngrok. Can you suggest a clear solution?

alexdlaird
  • 1,174
  • 12
  • 34
Kaleab Woldemariam
  • 2,567
  • 4
  • 22
  • 43

1 Answers1

1

FastCGI was deprecated in Django 6+ years ago, their docs say WSGI is the preferred alternative, and they provide a tutorial for types of WSGI deployments to get you started.

But you wouldn't use ngrok in this case, you'd serve it up with something like nginx or apache using a wsgi mod (also shown in their tutorial). Where you'd use ngrok is in development with Django's built-in dev server, and that's the full example provided in pyngrok's documentation.

Usually I'd provide actual sample code here, but what you're asking about are full end-to-end solutions, which is why I'm providing links. Without the full context and examples of what you've built, it's hard to tell you where it's going wrong—hard to provide specific solutions without specific examples of the problem. But these tutorials tutorials are for exactly what you're doing, so hopefully they can help you debug your own solution.

Dharman
  • 30,962
  • 25
  • 85
  • 135
alexdlaird
  • 1,174
  • 12
  • 34
  • Do any of ngnix or Apache work with ngrok or alternatives to deploying a local development server? – Kaleab Woldemariam Jul 25 '21 at 17:59
  • Sure, `ngrok` is just generating a public URL that forwards to the local port you give it. That local port could be Django's dev server (8000 by default), or Apache or nginx (whatever port you set them up for), or something else completely like MySQL. If you don't want to mess with DNS or port forwarding on your router, using `ngrok` to forward to any server will work. I suggested Django's dev server simply because it requires zero setup compared to production-grade servers like nginx or Apache, but any will work. – alexdlaird Jul 26 '21 at 14:46