Oguz Bilgic
Oguz Bilgic

Reputation: 3480

Deploying Python via CGI

How do I deploy a Python project to a webserver that supports Python via CGI? I'm well versed in PHP, but do not understand CGI's relation to Python in the deployment process.

Any resource links are appreciated.

The web host in question is GoDaddy.

Upvotes: 1

Views: 396

Answers (2)

Shane C. Mason
Shane C. Mason

Reputation: 7615

To actually answer your question about deploying python as CGI (while it does not make a lot of sense on a high activity system - there are occasions where it does the job just fine) you just make sure that your files are executable, have the correct extension and then follow this tutorial. It is what I used to learn from.

EDIT: To be clear - I recommend that you look into Django to deploy web based python applications.

Upvotes: 0

S.Lott
S.Lott

Reputation: 391846

Generally, we use mod_wsgi to make a Python application respond to CGI.

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

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

Upvotes: 3

Related Questions