Free python server.
Robin Becker
robin at reportlab.com
Fri Jan 14 12:46:07 EST 2005
rootshell at gazeta.pl wrote:
>>Your file probably need to (a) be in the cgi-bin, not public_html,
>
> (b)
>
>>be flagged executable ("chmod a+x file.py"), and (c) begin with the
>>line: '#!/usr/bin/env python'
>>
>>If the server doesn't provide you with CGI (or, strongly preferable,
>>SCGI or mod_python), you're probably out of luck.
>
>
> You're probably right, this machine doesn't provide with CGI, I'll send
> an e-mail to administrator of arbornet.org and make sure.
>
> So, I ask once again: does anyone know where I can put my *.py files?
> Greetings.
> Rootshell.
>
Hi, I just made a cgi script on rht earbornet machine.
Process as follows
mkdir public_html
chmod 0755 public_html
cd public_html
mkdir cgi-bin
chmod 0755 cgi-bin
echo hello world > index.html
cd cgi-bin
echo '#!/bin/sh
> echo content-type: text/html
> echo
> echo "<html><head></head><body><h1><font color=red>Hello
World!</font></h1></body></html>"
> ' > hw.cgi
chmod a+x hw.cgi
then
http://m-net.arbornet.org/~rgbecker/cgi-bin/hw.cgi
gives a nice red hello world ie acts as a cgi script
I also created the standard echo script
pytestcgi.cgi
as
#!/usr/local/bin/python
import cgi
cgi.test()
chmodded as before. See
http://m-net.arbornet.org/~rgbecker/cgi-bin/pytestcgi.cgi
Please don't misuse it's free and I'm no longer an American :)
--
Robin Becker
More information about the Python-list
mailing list