Re: Free python server.

Discussion in 'Python' started by Craig Ringer, Jan 13, 2005.

  1. Craig Ringer

    Craig Ringer Guest

    On Thu, 2005-01-13 at 19:07 +0100, wrote:
    > Thank you very much.
    > Arbornet.org seems to be ok
    > Unforutnately I was convinced that I only have to only copy my *.py file to
    > /public_hml directory and everything will be all right.


    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.

    --
    Craig Ringer
    Craig Ringer, Jan 13, 2005
    #1
    1. Advertising

  2. Craig Ringer

    Guest

    > 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.
    , Jan 14, 2005
    #2
    1. Advertising

  3. Craig Ringer

    Robin Becker Guest

    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
    Robin Becker, Jan 14, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. -
    Replies:
    2
    Views:
    386
    Alan Krueger
    Jul 29, 2005
  2. mutant
    Replies:
    0
    Views:
    422
    mutant
    Nov 27, 2005
  3. java
    Replies:
    0
    Views:
    397
  4. george
    Replies:
    0
    Views:
    1,080
    george
    Aug 29, 2008
  5. mohammed_a_o
    Replies:
    0
    Views:
    256
    mohammed_a_o
    Nov 30, 2010
Loading...

Share This Page