Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Running python

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

  1. netvistun

    netvistun Active Member

    Joined:
    Mar 10, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    151
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. netvistun

    netvistun Active Member

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

    *bump* *bump*
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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 Active Member

    Joined:
    Mar 10, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    151
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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 Active Member

    Joined:
    Mar 10, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    151
    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 :(
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice