How to setup webserver for Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • A

    How to setup webserver for Python

    Hello,
    I have a webhosting account with one company.
    I can use python from command line through Telnet(SSH) but can not run successfully
    Python program from a browser.(They use Apache web server.)
    What must I do?
    What permission must I set on directory and the python file?
    Here is a simple program I would like to run
    ########
    #!/usr/bin/python
    print "Content-Type: text/html" print
    print"AAA"
    ########
    Thanks for help
    Ladislav

    I look forward to hearing from you soon.

    Best regards,
    Ladislav Blazek( Mr.)

    BMA TRADING Ltd.
    email1: export@sendme.c z
    email2: export@bmatradi ng.com
    email3: exportimport@qu ick.cz
    Fax:/Tel +420 516 447921
    Tel:+420 516 447920,
    Mobile:+420 602 849309




  • Jiri Barton

    #2
    Re: How to setup webserver for Python

    It is actually 'Options' not 'Option'

    Try:
    echo 'Options +ExecCGI' >.htaccess
    in the console and see.



    HTH, Jiri

    Comment

    • Jiri Barton

      #3
      Re: How to setup webserver for Python

      It is actually 'Options' not 'Option'

      Try:
      echo 'Options +ExecCGI' >.htaccess
      in the console and see.



      HTH, Jiri

      Comment

      • Richard

        #4
        Re: How to setup webserver for Python

        "A" <printers@sendm e.cz> wrote in message news:<mailman.1 057223466.3796. python-list@python.org >...[color=blue]
        > Hello,
        > I have a webhosting account with one company.
        > I can use python from command line through Telnet(SSH) but can not run successfully
        > Python program from a browser.(They use Apache web server.)
        > What must I do?
        > What permission must I set on directory and the python file?
        > Here is a simple program I would like to run
        > ########
        > #!/usr/bin/python
        > print "Content-Type: text/html" print
        > print"AAA"
        > ########
        > Thanks for help
        > Ladislav
        >
        > I look forward to hearing from you soon.
        >
        > Best regards,
        > Ladislav Blazek( Mr.)[/color]

        I would ask if they have mod_python setup, and if not, I would request
        it. This keeps python loaded into memory so there is much less load
        put on the server than having to load python every time your page got
        a hit.

        Richard

        Comment

        Working...