JustHost.com and Python CGI
I'm trying to get justhost.com to compile a python CGI script (helloworld.py) without much luck. The site says python works, but I can't find much.
I'm using http://webpython.codepoint.net/cgi_tutorial
开发者_运维技巧Has anyone gotten it to work?
Ok, I figured it out.
for justhost.com users you must do a few things.
- set up a directory in 'public_html/' called 'scgi-bin/'
- go to your control panel and the 'advanced options' -> 'Apache Handlers' -> now add a user defined apache handler ( handler: cgi-script, extenstion: .py) and 'add.'
- write your helloworld.py (http://webpython.codepoint.net/cgi_hello_world)
- upload this to the 'scgi-bin/' folder earlier created. (beware: must be uploaded in ascii format. Dreamweaver apparently uses binary as default, i used filezille (set transfer mode to ascii)
- run! www.yoursite.com/scgi-bin/helloworld.py
精彩评论