PDA

View Full Version : Python CGI on bluehost



yuchifang
01-15-2008, 09:22 AM
I want to run some Python CGI on bluehost.

I make a python script then "chmod +x" for it.
But I when I get from the web access, I always got the source code in plain text.

Then I changed created a link to it called foo.cgi (instead of foo.py), then it works correctly. Example:
http://www.2maomao.com/test2.cgi/
where test2.cgi actually links to a python script which is are executable.

Is there a way to avoid this kind of renaming?

Basil
01-15-2008, 09:36 AM
AddHandler cgi-script .py?

yuchifang
01-15-2008, 04:04 PM
AddHandler cgi-script .py?
could you tell me how to do this?
edit webalizer.conf?

yuchifang
01-15-2008, 04:10 PM
could you tell me how to do this?
edit webalizer.conf?

edit ~/www/.htaccess is ok :D