1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Running python

Discussion in 'General Discussion' started by netvistun, Mar 5, 2009.

  1. netvistun

    netvistun New Member

    Joined:
    Mar 10, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Hi everybody

    I'm trying to make django work on a server I'm admining. I'm not very used to working with python.

    I've reconfigured and built apache using the easy apache setup to include mod_fastCGI - was hoping that would help me, but I've googled around and I can't get the basic .fcgi script I found working.

    What's the best way for my users to run python? Ideally I'd use mod_python but since it's not supported in easy apache, and I have bad experiences making custom changes to the httpd.conf in the past (with cpanel overriding them), I'd like to try to make mod_fastcgi work or some other sollution.

    So my only requirement is that it wont break with future versions of apache and that the users don't have to have shell access.

    Best,
    Arnor
     
  2. netvistun

    netvistun New Member

    Joined:
    Mar 10, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    *bump*

    *bump* *bump*
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    If you prefer an unsupported solution, there is a EasyApache Custom Optional Module for mod_python available at:

    http://easyapache.cpanel.net
     
    #3 cPanelDavidG, Mar 6, 2009
    Last edited: Mar 6, 2009
  4. netvistun

    netvistun New Member

    Joined:
    Mar 10, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Hi David

    I don't prefer and unsupported solution over a supported one. Is there a supported solution?

    The ideal situation was for mod_python to be built into EasyApache, but if that's not happening soon, I wanted to find a semi-future proof (if not completely future proof) way.
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    Custom opt mods are natively supported by EasyApache and using the mod_python custom opt mod would be a future-resistant method of implementing mod_python.

    Currently, the only supported method of running Python through Apache on a cPanel/WHM environment is to run the Python scripts as CGI apps.
     
  6. netvistun

    netvistun New Member

    Joined:
    Mar 10, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Run Python as CGI apps

    Ok, I skipped the whole fast-cgi thing this time and just put in the .htaccess file:

    AddHandler cgi-script .py

    And now python is running :)

    I wasted all that time on fast-cgi, when I didn't need it :(
     

Share This Page