Jump to content

[Answered] Making A Python File Under The Domain's Document Root, Executable


mbdungo

Recommended Posts

How to make a Python file directly under the document root of a hosted domain (and not under the "/public_html/cgi-bin" directory), executable?

 

I mean, how can I achieve to execute my Python file e.g. at www.example.com/index.py and not at www.example.com/cgi-bin/index.py ?

Link to comment
Share on other sites

Activate Python:

Please note that you have to add a line in the .htaccess file to use Python.

The recommended directive is:

Addhandler cgi-script .py .pl .cgi

(This directive covers Perl, Python and CGI files.)

Getting a 500 Internal Server Error?

If you are getting a 500 Internal Server Error, it is most likely caused by the lack of execute permissions. Check to make sure the your Perl or Python script file has permissions of 755.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...