Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google site




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-16-2007
craigp84 craigp84 is offline
Registered User
 

Join Date: May 2007
Location: Glasgow, Scotland
Posts: 59
Yes, 'tis easy

Hi Davidfrank,

Yes this is an easy one, but you were along the right lines at the end of the post anyway - you were almost there!

You're going to have to speak to your sysadmin to make a one line change in his httpd.conf for this apache instance.

Basically there's a line says "AllowOverride None" - get him to delete that and do a reload of apache, then your .htaccess should take effect, the important bits in there is the +ExecCGI and the AddHandler cgi-script .py - this ensures that any .py files in the current directory will be run through whatever's specified on the shebang line (#! at the top).

For this to work, you'll go with your first approach, creating trial.py and putting your python code in there. The second approach (create a .html with some script tags in) won't work here.

Hope this helps,

Craig