Deploying Python over CGI

How do I deploy a Python project to a web server that supports Python via CGI? I'm good with PHP, but don't understand the relationship of CGI to Python in the deployment process.

Any links to resources are greatly appreciated.

This web host hosts GoDaddy.

+1


a source to share


2 answers


Typically, we use mod_wsgi to make the Python application respond to CGI.

PHP has a special role - the runtime language is a CGI application.



Python doesn't have this special role. Python - by default - is not a CGI application. It takes a piece of glue to play well with Apache. mod_wsgi is glue.

+3


a source


To actually answer the question about deploying python as CGI (although it doesn't make a lot of sense on a high activity system - there are times when it does a great job), you just make sure your executables have the correct extension, and then follow this tutorial . This is what I'm used to.



EDIT: To be clear - I recommend you learn Django for web based python deployment.

0


a source







All Articles